Wind power prediction method and device based on TS2Vec model

Through the improved TS2Vec model and LSTM model, the feature characterization and prediction of wind farm historical data is solved, and the shortcomings of traditional models in feature extraction and multi-data source fusion are achieved, achieving higher accuracy and reliability of wind power prediction.

CN119476644BActive Publication Date: 2025-04-15STATE GRID HUNAN ELECTRIC POWER CO LTD ELECTRIC POWER SCI RES INST +3
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510038711.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-04-15
Estimated Expiration
2045-01-10

AI Technical Summary

Technical Problem

Traditional wind power power prediction models have problems with weak feature extraction capabilities and high information loss when processing time series data. Existing methods usually only focus on a single data source and fail to fully consider the mutual influence between historical data and future weather conditions.

Method used

The improved TS2Vec model is used to characterize historical data, and the high-dimensional implicit vectors are extracted through random cropping and timestamp mask modules, and the residual structure representation of historical data is obtained by combining the efficient spatial pyramid module and hierarchical comparison unit. The characteristic representation results of historical data are spliced ​​with NWP data, and the LSTM model is used for prediction.

Benefits of technology

Effectively extracting potential patterns and features in wind power-related time series, overcoming the limitations of traditional prediction models in feature extraction, improving the accuracy and reliability of predictions, and making full use of meteorological prediction information to consider the mutual influence between historical data and future weather conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119476644B_ABST
    Figure CN119476644B_ABST
Patent Text Reader

Abstract

The present application provides a wind power prediction method and device based on the TS2Vec model, including: obtaining historical data of the wind farm in the past preset time period and NWP data of the forecast day for which wind power prediction is required, the historical data including historical measured weather data, historical measured power generation, and historical NWP data; using the improved TS2Vec characterization model to characterize the historical data; splicing the characteristic characterization results of the historical data with the NWP data to form a data matrix; applying the LSTM model to process the data matrix and output the wind power of the forecast day. It can effectively extract the potential patterns and features in the wind power related time series, overcome the limitations of the traditional prediction model in feature extraction, and thus improve the accuracy and reliability of the prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of wind power generation prediction, and in particular, relates to a wind power prediction method and device based on a TS2Vec model. Background Art

[0002] With the continuous growth of global energy demand and the improvement of environmental protection awareness, renewable energy has gradually become one of the focuses of international attention. Among renewable energy sources, wind energy, as a relatively mature and widely used form, has huge development potential and economic benefits. However, due to the complexity and randomness of wind speed, wind power has large fluctuations, which brings troubles to the operation and planning of wind power systems. Therefore, it is of great significance to accurately predict wind power time series. Wind power time series prediction can provide strong support for power grid dispatching, new energy power generation planning, and wind turbine operation and maintenance. An effective wind power prediction model can help optimize the dispatching and regulation of wind power systems, improve the performance and reliability of the system, and reduce energy costs and environmental pollution.

[0003] In the field of wind power time series prediction, domestic and foreign researchers have carried out a lot of research work. At present, commonly used prediction methods include statistical time series analysis methods, artificial intelligence methods and physical model-based methods. Among them, machine learning methods such as support vector machine (SVM), artificial neural network (ANN) and deep neural network (DNN) have been widely used in wind power prediction. However, traditional wind power prediction models have some problems when processing time series data, such as weak feature extraction capabilities and more information loss. In the existing wind power prediction methods, feature representation is relatively rarely used. Traditional time series prediction methods often rely on simple statistical features or directly use raw data, and fail to fully explore the deep information in the data. This makes the model show certain limitations when facing complex wind power changes.

[0004] In order to solve these problems, in recent years, some researchers have proposed unsupervised representation learning models, among which the TS2Vec model is a typical one. The TS2Vec model extracts features by mapping time series data into a low-dimensional vector space. Although the TS2Vec model has achieved certain results in various machine learning downstream tasks, its hole convolution module has certain deficiencies in capturing long-term dependencies, and its grid effect may lead to information loss or blurring. At the same time, the model has a large number of parameters and computational complexity.

[0005] In addition, existing wind power forecasting methods usually focus on a single data source, either using only historical power data or only future weather data. This single data source approach fails to fully consider the mutual influence between historical data and future weather conditions, limiting the model's predictive ability. Summary of the invention

[0006] The main purpose of the embodiments of the present invention is to provide a wind power prediction method and device based on the TS2Vec model, which can effectively extract potential patterns and features in wind power related time series, overcome the limitations of traditional prediction models in feature extraction, and thus improve the accuracy and reliability of prediction.

[0007] In a first aspect, a wind power prediction method based on a TS2Vec model is provided, the method comprising: obtaining historical data of a wind farm within a preset time period in the past and NWP data of a forecast day for which wind power prediction is required, the historical data comprising historical measured weather data, historical measured power generation, and historical NWP data; using an improved TS2Vec characterization model to perform feature characterization on the historical data, wherein the historical data is randomly cut into two partially overlapping time segments; using the input projection layer in the encoder in the improved TS2Vec characterization model to project each input in the two time segments into a high-dimensional latent vector; using the timestamp mask module in the encoder to randomly imply the high-dimensional latent vector, and outputting a first feature map with 64 channels; using the efficient spatial pyramid module in the encoder to process the first feature map to obtain a residual structure representation of the historical data, specifically for the first feature map Perform point-by-point convolution with a convolution kernel size of 1, and output a second feature map with 32 channels; use multiple parallel dilated convolution layers with increasing dilation parameters to perform convolution operations on the second feature map; in the order of increasing dilation parameters, for each dilated convolution layer, superimpose the outputs of all dilated convolution layers before the current dilated convolution layer with the output of the current dilated convolution layer to serve as the superimposed feature map of the current dilated convolution layer; concatenate all the superimposed feature maps of the dilated convolution layers and add them to the first feature map to obtain the residual structure representation of the historical data as the feature characterization result of the historical data; use the hierarchical comparison unit in the improved TS2Vec characterization model to perform time comparison and hierarchical comparison on the residual structure representation to obtain the feature characterization result of the historical data; concatenate the feature characterization result of the historical data with the NWP data to form a data matrix; apply the LSTM model to process the data matrix and output the wind power of the forecast day.

[0008] In one possible implementation, historical data of a wind farm within a preset time period in the past is obtained, including: using a preset sampling interval within the preset time period to collect historical measured weather data, historical measured power generation, and historical NWP data at the hub height of each wind turbine in the wind farm for which power prediction is required, the historical measured weather data including historical measured wind speed and historical measured wind direction, and the historical NWP data including historical NWP wind speed and historical NWP wind direction.

[0009] In another possible implementation, a plurality of parallel atrous convolutional layers with increasing dilation parameters are used to perform a convolution operation on the second feature map, including: for any parallel atrous convolutional layer i, i=1, 2, ..., 11, applying a dilation parameter of , a hole convolution layer with a convolution kernel size of 3 performs a convolution operation on the second feature map and outputs a feature map with 32 channels.

[0010] In another possible implementation, before the feature characterization results of the historical data are spliced ​​with the NWP data to form a data matrix, the following steps are included: upsampling the data length of the NWP data of the forecast day to 3 days; and performing data standardization on the upsampled NWP data.

[0011] In another possible implementation, upsampling the data length of the NWP data of the forecast day to 3 days includes: upsampling the NWP data of the forecast day according to the following relationship:

[0012] ;

[0013] in, , , The interpolation point corresponds to value, and are two known data points value, The interpolation point corresponds to value, and are two known data points value.

[0014] In a second aspect, a wind power prediction device based on a TS2Vec model is provided, and the device includes: a data acquisition module, which is used to obtain historical data of a wind farm within a preset time period in the past and NWP data of a forecast day for which wind power prediction is required, wherein the historical data includes historical measured weather data, historical measured power generation, and historical NWP data; a feature characterization module, which is used to perform feature characterization on the historical data using an improved TS2Vec characterization model, wherein two partially overlapping time segments are randomly cut from the historical data; the input projection layer in the encoder in the improved TS2Vec characterization model is used to project each input in the two time segments into a high-dimensional latent vector; the timestamp mask module in the encoder is used to randomly imply the high-dimensional latent vector, and a first feature map with 64 output channels is output; the efficient spatial pyramid module in the encoder is used to process the first feature map to obtain a residual structure representation of the historical data, and specifically to convolve the first feature map Point-by-point convolution with a kernel size of 1 outputs a second feature map with 32 channels; a plurality of parallel atrous convolution layers with increasing dilation parameters are used to perform convolution operations on the second feature map; for each atrous convolution layer, the outputs of all atrous convolution layers before the current atrous convolution layer are superimposed with the output of the current atrous convolution layer in the order of increasing dilation parameters as the superimposed feature map of the current atrous convolution layer; all the superimposed feature maps of the atrous convolution layers are spliced ​​and added to the first feature map to obtain the residual structure representation of the historical data as the feature characterization result of the historical data; the hierarchical comparison unit in the improved TS2Vec characterization model is used to perform time comparison and hierarchical comparison on the residual structure representation to obtain the feature characterization result of the historical data; a feature splicing module is used to splice the feature characterization result of the historical data with the NWP data to form a data matrix; a power prediction module is used to process the data matrix using an LSTM model and output the wind power on the predicted day.

[0015] In a third aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a wind power prediction method based on the TS2Vec model as provided in the first aspect is implemented.

[0016] In a fourth aspect, a non-transitory computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, a wind power prediction method based on the TS2Vec model as provided in the first aspect is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.

[0018] Figure 1A flow chart of a wind power prediction method based on a TS2Vec model provided by an embodiment of the present invention;

[0019] Figure 2 Schematic diagram of an improved TS2Vec model according to an embodiment of the present invention;

[0020] Figure 3 Schematic diagram of an efficient spatial pyramid module in the improved TS2Vec model of an embodiment of the present invention;

[0021] Figure 4 A schematic diagram of splicing historical data and NWP data of a forecast day according to an embodiment of the present invention;

[0022] Figure 5 Schematic diagram of the principle of the LSTM model of an embodiment of the present invention;

[0023] Figure 6 A structural diagram of a wind power prediction device based on a TS2Vec model provided by an embodiment of the present invention;

[0024] Figure 7 A schematic diagram of the physical structure of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0025] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar modules or modules with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present invention.

[0026] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, modules and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, modules, components and / or groups thereof. It should be understood that when we refer to a module as being "connected" or "coupled" to another module, it may be directly connected or coupled to the other modules, or there may be intermediate modules. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any modules and all combinations of one or more associated listed items.

[0027] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation method of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0028] The technical solution of the present application and how to solve the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0029] like Figure 1 FIG. 1 is a flow chart of a wind power prediction method based on a TS2Vec model provided by an embodiment of the present invention, wherein the method comprises:

[0030] Step S11, obtaining historical data of the wind farm in the past preset time period and NWP data of the forecast day for which wind power forecast is required, wherein the historical data includes historical measured weather data, historical measured power generation, and historical NWP data.

[0031] Step S12: using the improved TS2Vec characterization model to perform feature characterization on the historical data.

[0032] Step S13, combining the characteristic characterization results of the historical data with the NWP data to form a data matrix.

[0033] Step S14, applying the LSTM model to process the data matrix and outputting the wind power for the predicted day.

[0034] The embodiment of the present invention uses a representation learning method to perform feature characterization on historical data of a wind farm, which can effectively extract potential patterns and features in wind power-related time series, thereby improving the accuracy and reliability of predictions; at the same time, it effectively overcomes the limitations of traditional prediction models in feature extraction, so that the model can better adapt to complex time series data; it combines historical data with future numerical weather forecast (NWP) data, fully utilizes meteorological forecast information and fully considers the mutual influence between historical data and future weather conditions, further improving the accuracy of wind power prediction.

[0035] In step S11, optionally, a preset sampling interval is used within a preset collection time period to collect historical measured weather data, historical measured power generation, and historical NWP data at the hub height of each wind turbine in the wind farm that needs to perform power forecasting. The historical measured weather data includes historical measured wind speed and historical measured wind direction, and the historical NWP data includes historical NWP wind speed and historical NWP wind direction. In an embodiment of the present invention, the historical measured wind speed, historical measured wind direction, historical NWP wind speed, historical NWP wind direction, and historical power generation at the hub height of each wind turbine in the wind farm that needs to perform power forecasting at historical moments are collected. The data sampling interval is preferably 15 minutes. The preset time period is preferably 3 days before the forecast day. The embodiment of the present invention combines the feature characterization of historical power data and future weather data to provide more comprehensive information support for wind power forecasting. Feature characterization can extract potential patterns and features in time series data, thereby improving the performance of the prediction model.

[0036] The improved TS2Vec representation model of the embodiment of the present invention can be found in Figure 2 . The improved TS2Vec model improves the dilated convolution of the encoder part in the original TS2Vec model. The original TS2Vec model uses a dilated convolution module with 11 residual blocks to extract the contextual representation of each timestamp. Each residual block contains two one-dimensional dilated convolution layers with a dilation parameter of 2 to the power of i, and the convolution kernel size is 3. The dilation parameter (dilation) of the dilated convolution in each residual block increases from 1 to 1024. Since each residual block contains two dilated convolution layers with the same dilation parameter, when the dilated convolutions with the same dilation parameter are superimposed, some pixels in the feature map will not participate in the calculation. At the same time, the grid-based calculation method of the dilated convolution will cause the results between the convolution layers to be independent of each other, and the convolution results of the corresponding convolution layers are not correlated enough, resulting in local information loss. Although the original TS2Vec model uses a residual structure to overcome the partial grid effect caused by the dilated convolution, each residual block in the model performs a dilated convolution operation again on the basis of the previous residual block, rather than performing multi-scale feature extraction on the original input data respectively. In addition, the model has a large number of convolutional layers, which results in a large number of parameters and computation. Figure 2 Efficient spatial pyramid module in .

[0037] In step S12, optionally, the historical data is randomly cut into two partially overlapping time segments; the input projection layer in the encoder in the improved TS2Vec representation model is used to project each input in the two time segments into a high-dimensional latent vector; the timestamp mask module in the encoder is used to randomly hide the high-dimensional latent vector, and output a first feature map with 64 channels; the efficient spatial pyramid module in the encoder is used to process the first feature map to obtain a residual structure representation of the historical data; the hierarchical comparison unit in the improved TS2Vec representation model is used to perform time comparison and hierarchical comparison on the residual structure representation to obtain a feature representation result of the historical data as the feature representation result of the historical data.

[0038] When the efficient spatial pyramid module is applied to process the first feature map, optionally, the feature map is subjected to point-by-point convolution with a convolution kernel size of 1, and a second feature map with a number of output channels of 32 is obtained; a plurality of parallel dilated convolution layers with increasing dilation parameters are used to perform a convolution operation on the second feature map, specifically, for any parallel dilated convolution layer i, i=1, 2, ..., 11, the dilation parameter applied is , a dilated convolution layer with a convolution kernel size of 3 performs a convolution operation on the second feature map, and outputs a feature map with 32 channels; in increasing order of dilation parameters, for each dilated convolution layer, the outputs of all the dilated convolution layers before the current dilated convolution layer are superimposed with the output of the current dilated convolution layer as the superimposed feature map of the current dilated convolution layer; all the superimposed feature maps of the dilated convolution layers are concatenated and added to the first feature map to obtain a residual structure representation of the historical data.

[0039] Figure 3 The specific implementation method of the efficient spatial pyramid module in the embodiment of the present invention. The feature dimension of the first feature map output by the original TS2Vec model after the timestamp mask module is 64. The first feature map is transposed to make the number of feature map channels 64, and then a one-dimensional point-by-point convolution with a convolution kernel size of 1 is used to reduce the number of feature map channels to 32, thereby reducing the amount of subsequent calculations. Then, 11 expansion parameters are used to to The parallel hole convolution layer performs convolution operation on the second feature map after point-by-point convolution, where the convolution kernel size of each hole convolution layer is 3 and the dilation parameter (dilation) is (i represents the number of layers), the padding value is consistent with the dilation parameter of the dilated convolution layer, starting from the feature map output by the smallest dilated convolution kernel, the feature map output by each dilated convolution layer is superimposed step by step, and each superimposed feature map is spliced, and finally the spliced ​​feature map and the initial input feature map with 352 channels after projection through the linear connection layer are added to form a residual structure representation. The embodiment of the present invention directly uses the idea of ​​feature layering to directly layer and superimpose the outputs of dilated convolutions with different dilation parameters, which is actually adding different receptive fields, better compensating for the grid effect brought by dilated convolution, retaining local details and global semantic features, better capturing multi-scale temporal information, and at the same time, the use of point-by-point convolution reduces the overall computational complexity of the model.

[0040] The embodiments of the present invention improve the deficiencies of the dilated convolution module in the TS2Vec characterization model and combine the feature representations of historical data and future weather data, which is expected to improve the accuracy and reliability of wind power prediction and bring new technological breakthroughs and application prospects to the field of wind power prediction.

[0041] It should be noted that before step S12, the improved TS2Vec characterization model needs to be trained. In an embodiment of the present invention, the historical measured weather, power data and historical NWP data of the site for wind power prediction for more than one year can be obtained from the Supervisory Control And Data Acquisition (SCADA) system or the power station side. The data should at least include the historical measured wind speed, historical measured wind direction, historical NWP wind speed, historical NWP wind direction, and historical power generation of each wind turbine in the wind farm at the hub height at historical times. The data sampling interval should be 15 minutes. In addition, the historical data can be analyzed for correlation with the changes in wind power to further add other relevant historical data variables to the training data set. In this embodiment, the NWP data of the forecast day should be consistent with the historical NWP data source involved in the model training, and the data format, sampling frequency and dimensions of different meteorological elements should be the same.

[0042] At the same time, the historical measured weather, power data and historical NWP data of the site for wind power forecasting over the past year are subjected to data standardization, outlier detection and replacement, missing value completion and other preprocessing operations as training data sets. The embodiment of the present invention uses StandardScaler to perform data standardization, and the data standardization formula is:

[0043] ;

[0044] Where x is the original data value; μ is the mean of the feature, that is, the average of all data points; is the standard deviation of the feature, that is, the degree of dispersion of the data points.

[0045] The training dataset is then used to perform unsupervised training on the improved TS2Vec model, and the trained model is saved for subsequent feature representation calls.

[0046] In the embodiment of the present invention, before step S13, the data length of the NWP data of the forecast day is upsampled to 3 days; and the upsampled NWP data is subjected to data standardization processing.

[0047] See also Figure 4 , the historical data after feature characterization 3 days before the forecast date is the historical data after feature characterization by the improved TS2Vec model. The data sampling length is 288 sampling points within 72 hours before the wind power forecast date (the data sampling frequency is 15 minutes, and the 3-day data length is 3×24×4=288), and the feature dimension is 352. The data length of the NWP data on the forecast date is 96, so it is necessary to linearly interpolate and upsample the NWP data with a time length of 96 on the forecast date to NWP data with a time length of 288, and perform preprocessing such as data standardization on this basis. The upsampling process of NWP data uses the linear (linear interpolation) method of the interp1d function to upsample the NWP data length with a forecast day length of 96 sampling points to 288, and the upsampled data is also standardized using StandardScaler. The NWP data on the forecast day is upsampled according to the following relationship:

[0048] ;

[0049] in, , , The interpolation point corresponds to value, and are two known data points value, The interpolation point corresponds to value, and are two known data points value.

[0050] Then the two data with a length of 288 sampling points are aligned and spliced ​​along the time axis. The time length of the spliced ​​data is still 288, and the data feature dimension is improved.

[0051] The input data of the LSTM model in step S14 is the concatenated data with a length of 288 sampling points. Figure 5 , which contains 5 layers in total. The size units of the first 3 LSTM hidden layers are set to 50, and the return state (return_sequences) is set to True. The size units of the 4th LSTM hidden layer is set to 50, and the return state (return_sequences) is set to False. The 5th layer is a fully connected layer Dense, and the output spatial dimension is set to 96. The LSTM model finally outputs the predicted daily power generation with a length of 96.

[0052] The present invention uses a representation learning method to characterize the historical data of wind farms, which can effectively extract potential patterns and features in wind power-related time series, thereby improving the accuracy and reliability of predictions; at the same time, it effectively overcomes the limitations of traditional prediction models in feature extraction, allowing the model to better adapt to complex time series data.

[0053] The present invention makes innovative modifications to the dilated convolution module in the existing TS2Vec representation model, adopts an efficient spatial pyramid structure, better compensates for the grid effect caused by dilated convolution, and reduces the number of parameters and calculations of the model. It not only enhances the model's ability to capture multi-scale features, but also improves the model's flexibility and adaptability in processing complex time series data.

[0054] The present invention combines historical data with future numerical weather forecast (NWP) data, fully utilizes meteorological forecast information and fully considers the mutual influence between historical data and future weather conditions, further improving the accuracy of wind power prediction.

[0055] The embodiment of the present invention obtains historical data of the wind farm within a preset time period in the past and NWP data of the forecast day for which wind power forecasting is required, wherein the historical data includes historical measured weather data, historical measured power generation power, and historical NWP data; uses an improved TS2Vec characterization model to perform feature characterization on the historical data; concatenates the feature characterization results of the historical data with the NWP data to form a data matrix; and applies an LSTM model to process the data matrix and output the wind power of the forecast day. This embodiment of the present invention can effectively extract potential patterns and features in wind power-related time series, overcomes the limitations of traditional prediction models in feature extraction, and thus improves the accuracy and reliability of predictions.

[0056] like Figure 6 FIG. 1 is a structural diagram of a wind power prediction device based on a TS2Vec model provided by an embodiment of the present invention, wherein the device comprises:

[0057] The data acquisition module 601 is used to acquire historical data of the wind farm within a preset time period in the past and NWP data of the forecast day for which wind power forecast is required, wherein the historical data includes historical measured weather data, historical measured power generation, and historical NWP data;

[0058] A feature characterization module 602 is used to characterize the historical data using an improved TS2Vec characterization model;

[0059] A feature splicing module 603 is used to splice the feature characterization results of the historical data with the NWP data to form a data matrix;

[0060] The power prediction module 604 is used to apply the LSTM model to process the data matrix and output the wind power of the predicted day.

[0061] The device of the above embodiment is applied to the corresponding method in the above embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0062] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor (processor) 701, a communication interface (Communications Interface) 702, a memory (memory) 703 and a communication bus 704, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. The processor can call the logic instructions in the memory to execute a wind power prediction method based on the TS2Vec model, the method comprising: obtaining historical data of the wind farm in the past preset time period and NWP data of the forecast day for which wind power prediction is required, the historical data including historical measured weather data, historical measured power generation, and historical NWP data; using the improved TS2Vec characterization model to characterize the historical data; splicing the characteristic characterization results of the historical data with the NWP data to form a data matrix; applying the LSTM model to process the data matrix and output the wind power of the forecast day.

[0063] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.

[0064] On the other hand, an embodiment of the present invention further provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute a wind power prediction method based on the TS2Vec model provided by the above-mentioned method embodiments, the method including: obtaining historical data of the wind farm within a preset time period in the past and NWP data of the forecast day for which wind power prediction is required, the historical data including historical measured weather data, historical measured power generation, and historical NWP data; using an improved TS2Vec characterization model to perform feature characterization on the historical data; splicing the feature characterization results of the historical data with the NWP data to form a data matrix; applying an LSTM model to process the data matrix and output the wind power on the forecast day.

[0065] On the other hand, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute a wind power prediction method based on the TS2Vec model provided in the above embodiments, the method comprising: obtaining historical data of the wind farm within a preset time period in the past and NWP data of the forecast day for which wind power prediction is required, the historical data comprising historical measured weather data, historical measured power generation, and historical NWP data; using an improved TS2Vec characterization model to perform feature characterization on the historical data; concatenating the feature characterization results of the historical data with the NWP data to form a data matrix; applying an LSTM model to process the data matrix and output the wind power on the forecast day.

[0066] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

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

Claims

1. A wind power prediction method based on TS2Vec model, characterized in that: The method comprises: Obtain historical data of the wind farm within a preset time period in the past and NWP data of the forecast day for which wind power forecast is required, wherein the historical data includes historical measured weather data, historical measured power generation, and historical NWP data; The improved TS2Vec characterization model is used to characterize the historical data, wherein the historical data is randomly cut into two partially overlapping time segments; the input projection layer in the encoder in the improved TS2Vec characterization model is used to project each input in the two time segments into a high-dimensional implicit vector; the timestamp mask module in the encoder is used to randomly hide the high-dimensional implicit vector, and a first feature map with 64 channels is output; the first feature map is processed by the efficient spatial pyramid module in the encoder to obtain the residual structure representation of the historical data, specifically, the first feature map is convolved point by point with a convolution kernel size of 1, and a second feature map with 32 channels is output; The second feature map is convolved with multiple parallel atrous convolution layers with increasing dilation parameters; for each atrous convolution layer, the outputs of all the atrous convolution layers before the current atrous convolution layer are superimposed with the output of the current atrous convolution layer in the order of increasing dilation parameters to serve as the superimposed feature map of the current atrous convolution layer; the superimposed feature maps of all the atrous convolution layers are concatenated and added to the first feature map to obtain a residual structure representation of the historical data as a feature representation result of the historical data; the hierarchical comparison unit in the improved TS2Vec representation model is used to perform time comparison and hierarchical comparison on the residual structure representation to obtain a feature representation result of the historical data; splicing the characteristic characterization results of the historical data with the NWP data to form a data matrix; The LSTM model is applied to process the data matrix and output the wind power for the predicted day.

2. The method according to claim 1, characterized in that The obtaining of historical data of the wind farm within a preset time period in the past includes: A preset sampling interval is used within a preset collection time period to collect historical measured weather data, historical measured power generation, and historical NWP data at the hub height of each wind turbine in the wind farm where power prediction is required, wherein the historical measured weather data includes historical measured wind speed and historical measured wind direction, and the historical NWP data includes historical NWP wind speed and historical NWP wind direction.

3. The method according to claim 1, characterized in that The method of performing a convolution operation on the second feature map using a plurality of parallel atrous convolution layers with increasing dilation parameters includes: For any parallel atrous convolutional layer i, i=1, 2, …, 11, the dilation parameter applied is , a hole convolution layer with a convolution kernel size of 3 performs a convolution operation on the second feature map, and outputs a feature map with 32 channels.

4. The method according to claim 1, characterized in that Before the characteristic characterization results of the historical data are spliced ​​with the NWP data to form a data matrix, the method includes: Upsampling the data length of the NWP data of the forecast day to 3 days; The upsampled NWP data is subjected to data standardization processing.

5. The method according to claim 4, characterized in that The step of upsampling the data length of the NWP data of the forecast day to 3 days comprises: The NWP data of the forecast day are upsampled according to the following relationship: ; in, , , The interpolation point corresponds to value, and are two known data points value, The interpolation point corresponds to value, and are two known data points value.

6. A wind power prediction device based on TS2Vec model, characterized in that: The device comprises: A data acquisition module is used to acquire historical data of the wind farm within a preset time period in the past and NWP data of the forecast day for which wind power forecast is required, wherein the historical data includes historical measured weather data, historical measured power generation, and historical NWP data; A feature characterization module is used to perform feature characterization on the historical data using an improved TS2Vec characterization model, wherein the historical data is randomly cut into two partially overlapping time segments; the input projection layer in the encoder in the improved TS2Vec characterization model is used to project each input in the two time segments into a high-dimensional implicit vector; the timestamp mask module in the encoder is used to randomly hide the high-dimensional implicit vector, and output a first feature map with 64 channels; the efficient spatial pyramid module in the encoder is used to process the first feature map to obtain a residual structure representation of the historical data, specifically performing point-by-point convolution with a convolution kernel size of 1 on the first feature map, and outputting a second feature map with a channel number of 32. feature map; using multiple parallel atrous convolution layers with increasing dilation parameters to perform a convolution operation on the second feature map; in the order of increasing dilation parameters, for each atrous convolution layer, superimposing the outputs of all the atrous convolution layers before the current atrous convolution layer with the output of the current atrous convolution layer as the superimposed feature map of the current atrous convolution layer; splicing the superimposed feature maps of all the atrous convolution layers and adding them to the first feature map to obtain a residual structure representation of the historical data as a feature representation result of the historical data; applying the hierarchical comparison unit in the improved TS2Vec representation model to perform time comparison and hierarchical comparison on the residual structure representation to obtain a feature representation result of the historical data; A feature splicing module, used for splicing the feature characterization results of the historical data with the NWP data to form a data matrix; The power prediction module is used to apply the LSTM model to process the data matrix and output the wind power on the predicted day.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, a wind power prediction method based on the TS2Vec model as described in any one of claims 1 to 5 is implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, a wind power prediction method based on a TS2Vec model as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Wind power prediction method and device based on digital-analog double drive and storage medium

    CN114298446A

  • Mechanical ventilation man-machine asynchronous single-stage identification method and system

    CN116028862A