Wind speed data prediction method and device, electronic equipment and storage medium
By constructing a continuous spatiotemporal graph sequence and a spatiotemporal graph attention network, the accuracy problem caused by the lack of wind speed data in complex prediction scenarios is solved, and higher-precision wind speed data prediction is achieved.
Patent Information
- Application Number
- CN202510667380.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-05-21
AI Technical Summary
Existing technologies have low wind speed prediction accuracy in complex prediction scenarios due to missing data, and it is difficult to effectively capture the complex dynamic spatiotemporal dependencies between measuring points in the wind speed field.
By constructing a continuous spatiotemporal graph sequence containing weighted adjacent elements, the spatiotemporal graph attention network is used to perform node relationship attention processing, the missing wind speed station data is reconstructed, and the data is input into the wind speed prediction model for data processing.
It significantly improves the accuracy of wind speed data prediction in complex prediction scenarios and overcomes the shortcomings of traditional methods in dealing with missing data and capturing spatiotemporal dependencies.
Smart Images

Figure CN120687759A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a wind speed data prediction method, device, electronic device, and storage medium. Background Art
[0002] Wind speed data forecasting is the process of estimating and predicting future wind speeds using various methods and models using historical wind speed data and related meteorological data. In related technologies, for wind speed data forecasting in complex forecasting scenarios (such as railway environments), due to the presence of missing detection data, spatial interpolation methods (such as Kriging interpolation, inverse distance weighted method, nearest neighbor mean, etc.) are usually used to fill in the missing data, and then traditional time series modeling (such as ARIMA, autoregressive moving average, LSTM, etc.) is used to forecast wind speeds. However, these reconstruction and forecasting methods only focus on single-dimensional data in time or space, making it difficult to effectively capture the complex dynamic spatiotemporal dependencies between measuring points in the wind speed field, resulting in low prediction accuracy when forecasting wind speeds in complex forecasting scenarios. Summary of the Invention
[0003] The embodiments of the present application provide a wind speed data prediction method, device, electronic device, and storage medium, which can improve the accuracy of wind speed prediction for complex prediction scenarios.
[0004] To achieve the above objectives, a first aspect of an embodiment of the present application provides a wind speed data prediction method, the method comprising:
[0005] Obtaining three-dimensional spatial coordinates of a plurality of wind speed stations in a prediction scenario, and constructing a continuous spatiotemporal graph sequence in the prediction scenario based on the plurality of three-dimensional spatial coordinates, wherein the continuous spatiotemporal graph sequence includes an adjacency matrix, the continuous spatiotemporal graph sequence does not include wind speed station data of missing wind speed stations, and the adjacency matrix includes weighted adjacency elements between the missing wind speed stations and the other wind speed stations;
[0006] Inputting the continuous spatiotemporal graph sequence into a spatiotemporal graph attention network, sequentially performing node relationship attention processing on the wind speed station data of the missing wind speed station based on the weighted adjacent elements through multiple cascaded graph attention layers to obtain a complete spatiotemporal graph sequence, wherein the complete spatiotemporal graph sequence includes the wind speed station data of the missing wind speed station;
[0007] The complete spatiotemporal graph sequence is input into a wind speed prediction model for data processing to obtain a wind speed data prediction result of the prediction scenario.
[0008] In some embodiments, constructing a continuous spatiotemporal graph sequence in the predicted scene based on the plurality of three-dimensional space coordinates includes:
[0009] Performing weighted sum calculation based on the three-dimensional spatial coordinates and direction weights of each two wind speed stations to obtain edge features between each two wind speed stations;
[0010] Obtaining a graph connection threshold based on a difference between the three-dimensional space coordinates of every two wind speed stations and performing percentage processing;
[0011] The continuous spatiotemporal graph sequence is obtained based on the graph connectivity threshold and the edge features.
[0012] In some embodiments, obtaining the continuous spatiotemporal graph sequence based on the graph connectivity threshold and the edge feature includes:
[0013] When the difference between the three-dimensional space coordinates of each two wind speed stations does not exceed the graph connection threshold, obtaining the weighted adjacent elements of each two wind speed stations based on the inverse of the edge feature, and combining all the weighted adjacent elements to obtain an adjacency matrix;
[0014] Obtaining a degree matrix based on the sum of the elements in each column of the adjacency matrix;
[0015] Performing normalization processing based on the degree matrix to obtain a graph structure;
[0016] The continuous spatiotemporal graph sequence is obtained by combining graph structures corresponding to multiple continuous times.
[0017] In some embodiments, the training process of the spatiotemporal graph attention network includes:
[0018] Acquire multiple training spatiotemporal graph sequences, wherein the training spatiotemporal graph sequences include multiple site data, missing site data, an adjacency weight matrix between the missing site and other sites, and site label data corresponding to the missing site data;
[0019] Generate a node feature vector based on the missing site data, and construct a node feature update function for each graph attention layer in the spatiotemporal graph attention network based on the node feature vector, the adjacency matrix, and the attention parameter of the spatiotemporal graph attention network;
[0020] Constructing a loss function based on the data difference between the node feature vector and the site label data;
[0021] The network parameters of the spatiotemporal graph attention network and the node feature vector are iteratively updated based on the node feature update function and the loss function, and the network parameters after multiple iterative updates are used to perform node relationship attention processing on the continuous spatiotemporal graph sequence.
[0022] In some embodiments, generating a node feature vector based on the missing site data, and constructing a node feature update function for each graph attention layer in the spatiotemporal graph attention network based on the node feature vector, the adjacency matrix, and the attention parameter of the spatiotemporal graph attention network, includes:
[0023] Accumulate the attention parameters between the missing site and each other site, and then multiply them by the adjacency weight matrix and the node feature vector of the previous graph attention layer to obtain a node feature update term;
[0024] An activation function is performed based on the node feature update item to obtain the node feature update function of the current layer graph attention layer.
[0025] In some embodiments, constructing a loss function based on the data difference between the node feature vector and the site label data includes:
[0026] Based on the bi-norm of the edge weight matrix between nodes, multiplied by the regularization coefficient, the edge weight norm is obtained;
[0027] Based on the binary norm of all the data differences, an average process is performed to obtain a data difference norm;
[0028] The loss function is obtained by accumulating the edge weight norm and the data difference norm.
[0029] In some embodiments, the iteratively updating the network parameters of the spatiotemporal graph attention network and the node feature vector based on the node feature update function and the loss function includes:
[0030] Performing relational attention processing on the input data using the node feature update function of the graph attention layer to obtain output data, wherein the input data of the first graph attention layer is the node feature vector, the input data of the next graph attention layer is the output data of the previous graph attention layer, and the output data of the last graph attention layer is the reconstructed site data of the missing site;
[0031] The network parameters of the graph attention layer are updated based on the output data and the loss function.
[0032] In some embodiments, inputting the complete spatiotemporal graph sequence into a wind speed prediction model for data processing to obtain a wind speed data prediction result for the prediction scenario includes:
[0033] In the wind speed prediction model, after the complete spatiotemporal graph sequence is subjected to wavelet transform decomposition processing, a placeholder is added at the end to obtain a trend component and a frequency component;
[0034] Embedding the trend component and the frequency component to obtain embedded node features, and obtaining graph structure data based on the embedded node features and the embedded edge features;
[0035] The graph structure data is input into the graph neural network for forward propagation processing to obtain the wind speed data prediction result.
[0036] To achieve the above-mentioned purpose, the second aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the wind speed data prediction method described in the first aspect.
[0037] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is executed by a processor, it implements the wind speed data prediction method described in the first aspect above.
[0038] The wind speed data prediction method, device, electronic device and storage medium proposed in the embodiments of the present application include: first, obtaining the three-dimensional spatial coordinates of multiple wind speed stations in the prediction scene, and constructing a continuous spatiotemporal graph sequence in the prediction scene based on the multiple three-dimensional spatial coordinates, the continuous spatiotemporal graph sequence including an adjacency matrix, the continuous spatiotemporal graph sequence does not include the wind speed station data of the missing wind speed station, and the adjacency matrix includes weighted adjacent elements between the missing wind speed station and other wind speed stations; then, inputting the continuous spatiotemporal graph sequence into the spatiotemporal graph attention network, and performing node relationship attention processing on the wind speed station data of the missing wind speed station based on the weighted adjacent elements through multiple layers of cascaded graph attention layers to obtain a complete spatiotemporal graph sequence, the complete spatiotemporal graph sequence including the wind speed station data of the missing wind speed station; finally, inputting the complete spatiotemporal graph sequence into the wind speed prediction model for data processing to obtain the wind speed data prediction result of the prediction scene. The embodiment of the present application constructs a continuous spatiotemporal graph sequence containing weighted adjacent elements, which can clarify the spatial topological relationship and potential impact intensity between each wind speed station from the initial stage, laying a structured foundation for subsequent processing, and then uses the spatiotemporal graph attention network to process the sequence containing missing data. Through the node relationship attention mechanism of the multi-layer graph attention layer, it can intelligently and dynamically learn and utilize the known station data and its spatiotemporal correlation to reconstruct the wind speed data of the missing stations with high precision. It is far superior to the traditional spatial interpolation method that only relies on fixed spatial distances or statistical characteristics, thereby obtaining a more realistic and complete spatiotemporal graph sequence. Afterwards, this high-quality complete spatiotemporal graph sequence is input into the subsequent wind speed prediction model, so that the prediction model can learn and infer based on more comprehensive and accurate spatiotemporal dependency information, so as to overcome the shortcomings of the existing technology in processing missing data and capturing complex dynamic spatiotemporal dependencies, thereby significantly improving the accuracy of wind speed data prediction in complex prediction scenarios (such as railway environments).
[0039] Other features and advantages of the present application will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present application. The purposes and other advantages of the present application can be achieved and obtained through the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 This is a flow chart of a wind speed data prediction method provided in one embodiment of the present application.
[0041] Figure 2 yes Figure 1 Flowchart of step 101 in FIG.
[0042] Figure 3 yes Figure 2 Flowchart of step 203 in FIG.
[0043] Figure 4 This is a schematic diagram of a distributed site coordinate graph structuring and graph embedding framework provided by another embodiment of the present application.
[0044] Figure 5 This is a training flowchart of the spatiotemporal graph attention network provided by another embodiment of the present application.
[0045] Figure 6 yes Figure 5 Flowchart of step 502 in FIG.
[0046] Figure 7 yes Figure 5 Flowchart of step 503 in FIG.
[0047] Figure 8 yes Figure 5 Flowchart of step 504 in FIG.
[0048] Figure 9 This is a structural framework diagram of a spatiotemporal graph attention reconstruction model provided by another embodiment of the present application.
[0049] Figure 10 This is a performance simulation diagram of the first spatiotemporal graph attention reconstruction model provided by another embodiment of the present application.
[0050] Figure 11 This is a performance simulation diagram of the second spatiotemporal graph attention reconstruction model provided by another embodiment of the present application.
[0051] Figure 12 This is a performance simulation diagram of the third spatiotemporal graph attention reconstruction model provided by another embodiment of the present application.
[0052] Figure 13 This is a performance simulation diagram of the fourth spatiotemporal graph attention reconstruction model provided by another embodiment of the present application.
[0053] Figure 14 This is a performance simulation diagram of the fifth spatiotemporal graph attention reconstruction model provided by another embodiment of the present application.
[0054] Figure 15 This is a performance simulation diagram of the sixth spatiotemporal graph attention reconstruction model provided by another embodiment of the present application.
[0055] Figure 16 This is a performance simulation diagram of the seventh spatiotemporal graph attention reconstruction model provided by another embodiment of the present application.
[0056] Figure 17 yes Figure 1 Flowchart of step 103 in FIG.
[0057] Figure 18 This is a schematic diagram of the structural framework of a wind speed prediction model based on a time-space graph sequence provided in another embodiment of the present application.
[0058] Figure 19 This is a performance simulation diagram of the first wind speed prediction model based on a time-space graph sequence provided by another embodiment of the present application.
[0059] Figure 20 This is a performance simulation diagram of a second wind speed prediction model based on a time-space graph sequence provided by another embodiment of the present application.
[0060] Figure 21 This is a performance simulation diagram of a third wind speed prediction model based on a time-space graph sequence provided by another embodiment of the present application.
[0061] Figure 22 This is a performance simulation diagram of a fourth wind speed prediction model based on a time-space graph sequence provided by another embodiment of the present application.
[0062] Figure 23 This is a schematic diagram of a wind speed data prediction process for a prediction scenario provided by another embodiment of the present application.
[0063] Figure 24 This is a schematic diagram of the hardware structure of an electronic device provided in another embodiment of the present application. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0065] It should be noted that although the functional modules are divided in the device schematic and the logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in a different order than the module division in the device or the order in the flowchart.
[0066] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0067] Wind speed data forecasting is the process of estimating and predicting future wind speeds using various methods and models using historical wind speed data and related meteorological data. In related technologies, for wind speed data forecasting in complex forecasting scenarios (such as railway environments), due to the presence of missing detection data, spatial interpolation methods (such as Kriging interpolation, inverse distance weighted method, nearest neighbor mean, etc.) are usually used to fill in the missing data, and then traditional time series modeling (such as ARIMA, autoregressive moving average, LSTM, etc.) is used to forecast wind speeds. However, these reconstruction and forecasting methods only focus on single-dimensional data in time or space, making it difficult to effectively capture the complex dynamic spatiotemporal dependencies between measuring points in the wind speed field, resulting in low prediction accuracy when forecasting wind speeds in complex forecasting scenarios.
[0068] In order to improve the accuracy of wind speed prediction for complex prediction scenarios, the embodiment of the present application constructs a continuous spatiotemporal graph sequence containing weighted adjacent elements, which can clarify the spatial topological relationship and potential impact intensity between each wind speed station from the initial stage, laying a structured foundation for subsequent processing. Then, the spatiotemporal graph attention network is used to process the sequence containing missing data. Through the node relationship attention mechanism of the multi-layer graph attention layer, it can intelligently and dynamically learn and utilize the known station data and its spatiotemporal correlation to reconstruct the wind speed data of the missing station with high precision. It is far superior to the traditional spatial interpolation method that only relies on fixed spatial distance or statistical characteristics, thereby obtaining a more realistic and complete spatiotemporal graph sequence. Afterwards, this high-quality complete spatiotemporal graph sequence is input into the subsequent wind speed prediction model, so that the prediction model can learn and infer based on more comprehensive and accurate spatiotemporal dependency information, so as to overcome the shortcomings of the existing technology in processing missing data and capturing complex dynamic spatiotemporal dependencies, thereby significantly improving the accuracy of wind speed data prediction in complex prediction scenarios (such as railway environments).
[0069] The wind speed data prediction method, device, electronic device and storage medium provided by the embodiments of the present application are described below. The wind speed data prediction method provided by the embodiments of the present application can be applied to any server or computing processor with computing resources.
[0070] The wind speed data prediction method in the embodiment of the present application will be described in detail below. Figure 1 , which is an optional flow chart of the wind speed data prediction method provided in an embodiment of the present application, Figure 1 The method may include but is not limited to steps 101 to 103. It is also understood that this embodiment is for Figure 1 The order of step 101 to step 103 is not specifically limited, and the order of steps can be adjusted or some steps can be reduced or added according to actual needs.
[0071] Step 101: Acquire the three-dimensional spatial coordinates of multiple wind speed stations in the forecast scene, and construct a continuous spatiotemporal graph sequence in the forecast scene based on the multiple three-dimensional spatial coordinates.
[0072] Step 101 is described in detail below.
[0073] In some embodiments, in response to a request for wind field data prediction for a prediction scenario, the three-dimensional spatial coordinates of multiple wind speed stations distributed within the prediction scenario and the actual wind speed data are first obtained. These three-dimensional spatial coordinates generally include key geographical location information such as the longitude, latitude, and altitude of each station. The equivalent latitude and longitude of the station are used as the x and y directions, respectively, and the altitude of the wind speed measurement point from the ground is the z direction. Each wind speed measurement station is represented as a node in the graph, and each node has a three-dimensional coordinate feature (longitude, latitude, altitude) corresponding to the three-dimensional spatial coordinate.
[0074] Based on these precise, multiple 3D spatial coordinates, we will further construct a structured data representation of the forecast scenario: a continuous spatiotemporal graph sequence. This continuous spatiotemporal graph sequence refers to a series of graph structures that evolve over time, where each graph represents a snapshot in time. Nodes in the graph correspond to wind speed stations, while edges represent the spatial relationships between stations. A key component of this continuous spatiotemporal graph sequence is the adjacency matrix, which mathematically describes the connectivity between nodes in the graph.
[0075] Because complex prediction scenarios (such as railway scenarios) often involve missing measured data for certain stations, the continuous spatiotemporal graph sequence does not include wind speed station data for those stations with missing actual observation data during the initial construction phase. However, the adjacency matrix design takes this missing data into account and still includes weighted adjacency elements between the missing wind speed stations and other wind speed stations. These weighted adjacency elements are specific values in the adjacency matrix that quantify the strength of the spatial association or potential impact between a station and other stations, even if data for a station is missing, providing a foundation for subsequent data reconstruction.
[0076] Reference Figure 2 , constructing a continuous spatiotemporal graph sequence in a prediction scene based on multiple three-dimensional space coordinates, including the following steps 201 to 203.
[0077] Step 201: Perform weighted sum calculation based on the three-dimensional spatial coordinates and direction weights of every two wind speed stations to obtain the edge features between every two wind speed stations.
[0078] Step 202: A graph connection threshold is obtained based on the difference between the three-dimensional spatial coordinates of every two wind speed stations and percentage processing is performed.
[0079] Step 203: Based on the graph connectivity threshold and edge features, a continuous spatiotemporal graph sequence is obtained.
[0080] Steps 201 to 203 are described in detail below.
[0081] In some embodiments, in order to quantify the strength of the spatial relationship between any two wind speed stations in the prediction scenario, a weighted sum calculation is performed based on the precise three-dimensional spatial coordinates (such as longitude, latitude and altitude) of each two wind speed stations and a preset "directional weight", and the edge features between each two wind speed stations can be obtained as shown in the following formula (1).
[0082] d ij =α|Δx|+β|Δy|+γ|Δz| (1)
[0083] The directional weights (α, β, γ) = (0.2, 0.2, 0.6) refer to the different importance coefficients assigned to different spatial dimensions (corresponding to the weights of the influence of longitude, latitude, and altitude on wind speed) to reflect the differences in their influence on wind speed, among which the altitude factor has the largest weight.
[0084] Through this weighted sum calculation, for example, using the weighted Euclidean distance formula, the edge characteristics between each two wind speed stations can be obtained, which is used as a comprehensive measure of the spatial distance or similarity between the two stations. It is not just a simple geometric distance, but a weighted result that takes into account factors influencing different directions, providing basic edge attribute information for the subsequent construction of the graph structure.
[0085] In order to determine which sites should be connected when constructing the graph structure, a reasonable graph connection threshold corresponding to each direction is predetermined. When determining the graph connection threshold corresponding to each direction, the difference between the three-dimensional spatial coordinates of each two wind speed sites is calculated, and their differences in longitude, latitude, and altitude are calculated respectively. Then, these difference distributions are processed as percentages to obtain the graph connection threshold corresponding to each direction (including longitude, latitude, and altitude) as shown in the following formulas (2) to (4).
[0086] τ z =Percentile 85% (|z i -z j |) (2)
[0087] τ x =Percentile 95% (|x i -x j |) (3)
[0088] τ y =Percentile 95%(|y i -y j |) (4)
[0089] The percentage processing here usually refers to the use of percentile methods, for example, selecting a specific percentile (such as 85% or 95%) difference as the connection threshold in the corresponding direction. In this way, the system can adaptively determine the tolerance for connections in different spatial dimensions based on the distribution characteristics of the data itself, thereby obtaining one or more graph connection thresholds. In this embodiment, the 85% percentile value is used for height difference and the 95% percentile value is used for horizontal distance (longitude and latitude).
[0090] Next, we further utilize the generated graph connection thresholds and edge features between each pair of stations to ultimately construct a continuous spatiotemporal graph sequence for the forecast scenario. This allows us to construct a graph representing the spatial structure of the wind speed field at a single point in time. Because wind speed data varies over time, such a graph structure is constructed for each observation time point. These chronologically arranged graph structures combine to form a continuous spatiotemporal graph sequence, which dynamically reflects the temporal and spatial evolution of the wind speed field. The following further describes how to utilize the graph connection thresholds and edge features between each pair of stations to construct a continuous spatiotemporal graph sequence for the forecast scenario.
[0091] Reference Figure 3 , based on the graph connection threshold and edge features, a continuous spatiotemporal graph sequence is obtained, including the following steps 301 to 304.
[0092] Step 301: When the difference between the three-dimensional spatial coordinates of each two wind speed stations does not exceed the graph connection threshold, the weighted adjacent elements of each two wind speed stations are obtained based on the inverse of the edge feature, and all weighted adjacent elements are combined to obtain an adjacency matrix.
[0093] Step 302: Obtain a degree matrix based on the sum of the elements in each column of the adjacency matrix.
[0094] Step 303: Perform normalization processing based on the degree matrix to obtain a graph structure.
[0095] Step 304: Combine graph structures corresponding to multiple consecutive times to obtain a continuous spatiotemporal graph sequence.
[0096] Steps 301 to 304 are described in detail below.
[0097] In some embodiments, in order to construct a continuous spatiotemporal graph sequence in the prediction scenario, it is first necessary to construct an adjacency matrix to be weighted corresponding to the graph in the prediction scenario. When constructing the adjacency matrix, it is determined one by one whether the difference between the three-dimensional spatial coordinates of each two wind speed stations in each direction does not exceed the pre-set graph connection threshold (as shown in formulas (2) to (4)). If this condition is met, that is, the difference in each direction does not exceed the graph connection threshold in the corresponding direction, it indicates that the two stations are close enough or related in space and should be connected in the graph. At this time, the weighted adjacent elements between the two stations will be calculated based on the inverse of the edge feature between them, as shown in the following formula (5).
[0098]
[0099] By calculating such weighted adjacent elements for all pairs of sites that meet the conditions and arranging and combining these elements according to the site numbers, a complete adjacency matrix W is finally formed. The value of each element of the adjacency matrix W is the connection strength or weight w between the corresponding two sites. ij .
[0100] After obtaining the adjacency matrix, in order to perform subsequent graph structure normalization processing, it is necessary to calculate the degree matrix for auxiliary calculation. It can be understood that the degree matrix is a diagonal matrix, and the elements on its diagonal correspond to the degree of each node in the graph.
[0101] The diagonal elements in the degree matrix are obtained based on the sum of the elements in each column of the adjacency matrix, as shown in the following formula (6).
[0102]
[0103] For any node in the graph (i.e., the corresponding wind speed station), the corresponding diagonal element value in the degree matrix is equal to the sum of the weights of all edges connected to the node in the adjacency matrix, which reflects the total connection strength or centrality of the node in the graph.
[0104] Furthermore, in order to eliminate the influence of the node degree difference in the graph and make the graph representation more suitable for subsequent graph neural network model processing, the adjacency matrix W is normalized based on the obtained degree matrix D, as shown in the following formula (7).
[0105]
[0106] This normalization operation yields a standardized graph representation, known as the graph structure. This normalized graph structure can better balance the weight of information transfer between different nodes, helping to improve the performance and stability of graph learning algorithms.
[0107] Because wind speed monitoring data is collected continuously at different time points, the graph structure at a single time point can only reflect the spatial distribution characteristics at that moment. Therefore, to capture the dynamic characteristics of the wind speed field over time, graph structures corresponding to multiple consecutive time points are combined. These independent graph structures arranged in chronological order are serialized together, ultimately resulting in a continuous spatiotemporal graph sequence represented by a dynamic graph. This not only contains spatial connectivity information at each moment, but also reflects the evolution of these spatial structures and node attributes over time. For example, the wind speed measured in the survey area has a measurement window length of 120 seconds and a total measurement duration of 90 minutes. Each 1-second interval constitutes a graph structure, converting the original time series into a spatiotemporal graph sequence.
[0108] By executing steps 301 to 304 above, using threshold judgment and inverse calculation of edge features, the weighted adjacent elements in the adjacency matrix are precisely defined, reflecting the connection strength between sites. Then, by calculating the degree matrix and performing normalization, a standardized graph structure is obtained, which facilitates subsequent model processing. The graph structures of multiple time points are organically combined to form a continuous spatiotemporal graph sequence that can comprehensively describe the spatiotemporal dynamic characteristics of the wind speed field. This ensures that the input spatiotemporal graph sequence can accurately capture complex spatial dependencies and their temporal evolution, laying a solid data foundation for subsequent missing data reconstruction and high-precision wind speed prediction.
[0109] Reference Figure 4 , is a schematic diagram of a distributed site coordinate graph structuring and graph embedding framework provided by an embodiment of the present application. Figure 4 As shown in the figure, the edge features (Ex, Ey, Ez) between each two wind speed stations are calculated based on the three-dimensional spatial coordinates (X, Y, Z) and corresponding directional weights (α, β, γ) of multiple wind speed stations in the prediction scenario. Subsequently, based on the input three-directional graph connection thresholds (Tx, Ty, Tz) and preset weights (Wx, Wy, Wz), and combined with the calculated edge features, weighted adjacent elements are determined to form a weighted adjacency matrix. The final graph structure is then normalized to obtain a single time step graph representation foundation for the subsequent construction of a continuous spatiotemporal graph sequence.
[0110] By executing steps 201 to 203 above, the spatial relationship between sites is more finely characterized by using the edge features obtained by introducing directional weight calculations. By processing the percentage of the three-dimensional spatial coordinate differences, the graph connection threshold is adaptively determined, making the graph construction more robust. By comprehensively utilizing this information, a continuous spatiotemporal graph sequence that can reflect the dynamic characteristics of the actual wind speed field is generated. This can more accurately capture the complex interactions between the various measuring points in the wind speed field, providing a solid foundation for subsequent high-precision data reconstruction and prediction, thereby improving the effectiveness and reliability of the overall prediction scheme.
[0111] Step 102: Input the continuous spatiotemporal graph sequence into the spatiotemporal graph attention network, and perform node relationship attention processing on the wind speed station data of the missing wind speed stations based on weighted adjacent elements through multiple layers of cascaded graph attention layers to obtain a complete spatiotemporal graph sequence.
[0112] Step 102 is described in detail below.
[0113] In some embodiments, a sequence of constructed continuous spatiotemporal graphs, which carries information about the network topology of multiple wind speed stations in the forecast scenario but with missing data for some stations, will be fed as input into a specially designed spatiotemporal graph attention network.
[0114] The spatiotemporal graph attention network consists of multiple cascaded graph attention layers, each of which processes the input graph data. The core process involves applying node-relational attention to the wind speed data of missing wind speed stations based on the weighted adjacency elements defined in the adjacency matrix. This node-relational attention dynamically evaluates and weights the contributions of neighboring nodes to the target missing station, thereby learning and capturing complex spatiotemporal dependencies.
[0115] By iteratively propagating and updating features through these multi-layer cascaded graph attention layers, the spatiotemporal graph attention network can intelligently and accurately reconstruct missing wind speed data. Its final output is a complete spatiotemporal graph sequence. The main difference between this complete spatiotemporal graph sequence and the input is that it now includes the wind speed station data reconstructed by the network for the originally missing wind speed stations, making the entire dataset complete in both the spatiotemporal and temporal dimensions.
[0116] In order to enable the actual spatiotemporal graph attention network to effectively reconstruct the data of missing wind speed stations in the continuous spatiotemporal graph sequence, the spatiotemporal graph attention network needs to be trained accordingly in advance, as described below.
[0117] Reference Figure 5 ,The training process of the spatiotemporal graph attention network includes the following steps 501 to 504.
[0118] Step 501: Acquire multiple training spatiotemporal graph sequences, where the training spatiotemporal graph sequences include multiple site data, missing site data, adjacency weight matrices between missing sites and other sites, and site label data corresponding to the missing site data.
[0119] Step 502: Generate node feature vectors based on the missing site data, and construct a node feature update function for each graph attention layer in the spatiotemporal graph attention network based on the node feature vectors, the adjacency matrix, and the attention parameters of the spatiotemporal graph attention network.
[0120] Steps 501 to 502 are described in detail below.
[0121] In some embodiments, when training the spatiotemporal graph attention network, it is first necessary to obtain multiple training spatiotemporal graph sequences to guide the spatiotemporal graph attention network to learn how to reconstruct missing information. Specifically, these training spatiotemporal graph sequences include: multiple station data, that is, known observations or features of all wind speed stations in the prediction scene; missing station data corresponding to missing stations that lack wind speed station data. During the training process, the missing station data is part of the data that is intentionally removed or masked from the complete data, and its true value will be used as a learning target; an adjacency weight matrix describing the relationship between the missing station and other stations. This matrix defines the connection relationship and strength between all nodes in the graph. Even for missing nodes with missing data, their potential association with other stations is reflected through this matrix; and the station label data corresponding to the crucial missing station data. These label data are the true, unmasked wind speed values of those stations that are considered "missing". The network will strive to learn to predict or reconstruct these values.
[0122] Among them, it is also possible to randomly delete a group of nodes from the original complete spatiotemporal wind speed graph sequence, and fill all the missing sequence values with zero as the missing site data of the missing site, which corresponds to the missing data of the missing wind speed site in the actual continuous spatiotemporal graph sequence, thereby obtaining a training spatiotemporal graph sequence corresponding to the missing wind speed site data.
[0123] After the training data is ready, the network begins to build its core calculation mechanism. In this embodiment, a spatiotemporal graph attention network consisting of 4+1=5 graph attention layers is used to reconstruct missing wind speed data. The input of the spatiotemporal graph attention network is the original graph sequence with missing values from time tS to time t, where the missing sequence is padded and marked with zeros. The spatiotemporal graph attention network architecture has a total of 5 graph attention layers, and each layer uses a different ratio of discard rate for regularization. The calculation formula of the graph attention parameter is shown in the following formula (8).
[0124]
[0125] Therefore, during training, the initial node feature vector is generated based on the input missing site data (usually its masked representation or initial embedding during training) Subsequently, based on these initial node feature vectors, the adjacency matrix (which defines the spatial dependency structure between nodes), and the attention parameter α within the spatiotemporal graph attention network ij, to construct the node feature update function for each graph attention layer in the spatiotemporal graph attention network. This node feature update function is the core of the graph attention network. It specifies how each node's features are aggregated and transformed based on its own and its neighboring nodes' features, dynamically weighted by the attention mechanism, thereby learning higher-level node representations in each layer of the network. The following will further describe how to determine this node feature update function.
[0126] Reference Figure 6 , based on the node feature vector, the adjacency matrix and the attention parameters of the spatiotemporal graph attention network, a node feature update function of each graph attention layer in the spatiotemporal graph attention network is constructed, including the following steps 601 to 602.
[0127] Step 601: Accumulate the attention parameters between the missing site and each other site, and then multiply them by the adjacency weight matrix and the node feature vector of the previous graph attention layer to obtain the node feature update item.
[0128] Step 602: Perform activation function processing based on the node feature update item to obtain the node feature update function of the current layer graph attention layer.
[0129] Steps 601 to 602 are described in detail below.
[0130] In some embodiments, in order to calculate the new feature representation of each missing site in the graph attention network at the current layer, it is first necessary to determine the degree of influence of its neighboring nodes on it, that is, to achieve this by accumulating the attention parameters between the missing site and each other site; then, the accumulated attention weighted result is multiplied by the adjacency weight matrix (which defines the basic connection strength and structure between nodes) and the node feature vector of the previous graph attention layer (that is, the feature representation learned by its neighboring nodes in the previous network layer) to obtain the node feature update term, and then the node feature update term is processed by the activation function to obtain the node feature update function of each graph attention layer as shown in the following formula (9).
[0131]
[0132] Among them, α ij is the attention parameter, W is the adjacency weight matrix, is the node feature vector, is the set of neighbors of node i.
[0133] This multiplication operation combines the dynamic attention weights, static graph structure information, and neighboring node feature information to ultimately produce a comprehensive "node feature update." This update is essentially the information aggregated from the target node's neighborhood, filtered and weighted by the attention mechanism. This result, after being processed by the activation function, serves as the input to the next graph attention layer or, in the final layer, as the network's final output (e.g., the reconstructed wind speed value).
[0134] Through the above steps 601 and 602, by accumulating attention parameters and combining the adjacency weight matrix and the node feature vector of the previous layer, dynamic weighted aggregation of neighborhood information is achieved, and the core node feature update item is obtained, so that the network can intelligently focus on the neighbors that are most valuable for reconstructing information of missing stations. Then, by introducing activation function processing, the necessary nonlinearity is introduced into the features of linear aggregation, thereby constructing a complete node feature update function of the current layer graph attention layer, so that the spatiotemporal graph attention network can abstract and refine the complex dependencies in the spatiotemporal graph data layer by layer, accurately estimate and fill in the wind speed data of the missing stations, and ultimately improve the quality of data reconstruction.
[0135] Step 503: Construct a loss function based on the data difference between the node feature vector and the site label data.
[0136] Step 503 is described in detail below.
[0137] To quantify the performance of the spatiotemporal graph attention network on the reconstruction task and guide its parameter learning, it is necessary to define an appropriate loss function. In this embodiment, the loss function is constructed based on the data difference between the node feature vectors output by the network (especially the reconstructed wind speed values for missing stations) and the actual station label data (i.e., the original, accurate wind speed values for these missing stations), as described below.
[0138] Reference Figure 7 , based on the data difference between the node feature vector and the site label data, a loss function is constructed, including the following steps 701 to 703.
[0139] Step 701: Based on the binary norm of the edge weight matrix between nodes, multiply it by the regularization coefficient to obtain the edge weight norm.
[0140] Step 702: Based on the binary norm of all data differences, average processing is performed to obtain the data difference norm.
[0141] Step 703: Accumulate the edge weight norm and the data difference norm to obtain the loss function.
[0142] Steps 701 to 703 are described in detail below.
[0143] In order to prevent the spatiotemporal graph attention network from overfitting during training and to encourage it to learn simpler and more generalizable parameters, a regularization term is usually included in the loss function. The calculation of this regularization term is based on the bi-norm (Frobenius norm) of the edge weight matrix between nodes in the model. Therefore, based on the bi-norm of the edge weight matrix between nodes, multiplied by the regularization coefficient λ, the edge weight norm is obtained. The edge weight matrix refers to the learnable weight parameters in the graph attention layer, which indirectly or directly affect the strength of information transfer between nodes. This edge weight norm acts as a penalty term, encouraging the model to learn smaller weights, thereby reducing model complexity.
[0144] In addition, the core component of the loss function is a measure of the accuracy of the model reconstruction. Therefore, the binary norm of all data differences between the node feature vectors output by the model (especially the wind speed values reconstructed for the missing stations) and the actual station label data (i.e., the original, accurate wind speed values of these missing stations) is averaged to obtain the data difference norm. The loss function is obtained by accumulating the edge weight norm and the data difference norm as shown in the following formula (10).
[0145]
[0146] This loss function combines the model's goodness of fit to the training data and the model's complexity control, providing a comprehensive guidance signal for the network optimization process. During the training process, the goal of the optimization algorithm (such as gradient descent) is to minimize this accumulated loss function.
[0147] Through the above steps 701 to 703, by calculating the edge weight norm and introducing the regularization coefficient, the risk of model overfitting is effectively suppressed and the generalization ability of the model is enhanced. By calculating the second norm of all data differences and averaging them, a data difference norm that intuitively measures the model reconstruction performance is obtained. Then, these two are combined to form the final loss function, so that the spatiotemporal graph attention network is not only committed to improving the reconstruction accuracy of missing wind speed data during training, but also avoids learning overly complex model parameters, thereby ensuring that the model can also perform well on unseen data, which can effectively improve the reliability of wind speed data reconstruction in practical applications.
[0148] Step 504: Iteratively update the network parameters and node feature vectors of the spatiotemporal graph attention network based on the node feature update function and the loss function. The network parameters after multiple iterative updates are used to perform node relationship attention processing on the continuous spatiotemporal graph sequence.
[0149] Step 504 is described in detail below.
[0150] In some embodiments, after determining the node feature update function and loss function of the spatiotemporal graph attention network, the network parameters of the spatiotemporal graph attention network (the weight matrix within each attention layer and the parameters related to the calculation of the attention coefficient) and the node feature vectors that may exist in some architectures are iteratively updated. This iterative update process typically uses gradient descent and its variants (such as the Adam optimizer) to adjust the network parameters by backpropagating the gradient calculated by the loss function, as described below.
[0151] Reference Figure 8 , based on the node feature update function and the loss function, the network parameters and node feature vectors of the spatiotemporal graph attention network are iteratively updated, including the following steps 801 to 802.
[0152] Step 801: Use the node feature update function of the graph attention layer to perform relational attention processing on the input data to obtain output data. The input data of the first graph attention layer is the node feature vector, the input data of the next graph attention layer is the output data of the previous graph attention layer, and the output data of the last graph attention layer is the reconstructed site data of the missing site.
[0153] Step 802: Update the network parameters of the graph attention layer based on the output data and the loss function.
[0154] Steps 801 to 802 are described in detail below.
[0155] In some embodiments, during the iterative update of the spatiotemporal graph attention network, its forward propagation stage uses the node feature update function of the graph attention layer to perform relational attention processing on the input data. This processing is performed layer by layer in the multi-layer cascaded graph attention network: for the first graph attention layer, its input data is the initial node feature vector (for example, the original features of the wind speed station or the embedded features); for each subsequent graph attention layer, its input data is the output data of the previous graph attention layer, so that the information can be propagated layer by layer and continuously refined. Through the action of the node feature update function of each layer of graph attention layer, the node features will be updated according to their neighborhood information and attention weights. After processing by all graph attention layers, the output data of the last graph attention layer is the network's reconstructed site data for the missing site, which is the network's estimate of the missing wind speed value under the current parameters.
[0156] After the spatiotemporal graph attention network uses the output data (i.e., reconstructed site data) obtained from each training spatiotemporal graph sequence, it is compared with the actual site label data. Based on the loss function, the gradient of the loss function with respect to the network parameters of the graph attention layer (including hidden layer dimensions, dropout rate, learning rate, and other parameters) is calculated through the backpropagation algorithm. Then, using this gradient information, the network parameters (including hidden layer dimensions, dropout rate, learning rate, and other parameters) are updated through optimization algorithms (such as Adam and SGD). The goal of this update is to adjust the parameters in the direction of reducing the loss function value, so that the network can produce an output closer to the true value in the next iteration.
[0157] After multiple iterations of these updates, the network parameters of the spatiotemporal graph attention network gradually converge to a set of values that are effective for the reconstruction task. These fully trained network parameters can then be used to efficiently and accurately process node relationships in new, observed continuous spatiotemporal graph sequences, thereby reconstructing missing wind speed data in the real world.
[0158] Among them, node relationship attention processing is performed in each graph attention layer of the spatiotemporal graph attention network. Its core purpose is to dynamically evaluate and utilize the degree of mutual influence between wind speed stations in the graph to more accurately update the feature representation of each node (especially the nodes with missing data). Specifically, when performing node relationship attention processing on the wind speed station data of the missing wind speed stations based on weighted adjacent elements through multi-layer cascaded graph attention layers, in each layer of graph attention layer, for each missing wind speed station, the attention coefficient between the missing wind speed station and all other wind speed nodes is calculated (as shown in the above formula (8)); then, the attention coefficient is used as a weight, combined with the weighted adjacent elements between the missing wind speed station and other wind speed stations, and the features of the missing wind speed station and other wind speed stations (node feature vectors from the previous layer of graph attention layer) to perform weighted aggregation to achieve feature update for the missing wind speed station in the multi-layer graph attention layer (as shown in the above formula (9)), and through multi-layer cascaded such graph attention layers, the information of the missing wind speed station is propagated and refined layer by layer in the graph, so that the spatiotemporal graph attention network can capture complex long-range and short-range spatiotemporal dependencies, and finally achieve high-precision reconstruction of the wind speed station data of the missing wind speed station, thereby forming a complete spatiotemporal graph sequence.
[0159] For example, this example uses the Adam optimizer for model training. The initial learning rate is set to 0.001, and a learning rate decay strategy is used, multiplying the learning rate by 0.9 every 50 training cycles. The batch size is set to 64, and the total number of training iterations is 10,000. An early stopping strategy is used during training, terminating training when the validation set loss has not improved for 20 consecutive epochs. Hyperparameter tuning uses a grid search method to determine the optimal combination, including parameters such as hidden layer dimension, dropout rate, and learning rate.
[0160] When using a trained 5-layer spatiotemporal graph attention network to process time-series graph data with missing values, for the sequence within the time window tS to t, the missing parts are initialized to zero vectors and passed as input to the spatiotemporal graph attention network. The spatiotemporal graph attention network captures the spatial relationships between nodes and the temporal characteristics of each node through a multi-layer graph attention mechanism, ultimately outputting a reconstructed complete graph structure sequence. A complete spatiotemporal graph sequence is obtained based on multiple time-continuous graph structure sequences. The reconstruction process is expressed as: (4, S) + zeros(1, S) - (5, S) → (4, S) + 5-layerGAT(1, S) - (5, S), where S represents the number of sites, 4 represents the number of historical time steps retained for each site, 1 represents the number of time steps to be reconstructed, and 5 represents the total number of time steps output (history plus prediction).
[0161] Reference Figure 9 , is a schematic diagram of the structural framework of a spatiotemporal graph attention reconstruction model provided by an embodiment of the present application. Figure 9 As shown in , the original wind speed sequence containing missing station data and the corresponding original graph structure time series are taken as input. The data then enters a network composed of multiple graph attention layers and fully connected layers in cascade. The figure also shows the processing of missing sequences and the different discard rates used to prevent overfitting. The skip connections operation in the network facilitates information flow and feature learning. Through these hierarchical processing, especially the attention processing of the graph attention layer on the node relationship, the network finally outputs the reconstructed graph structure time series, that is, the complete spatiotemporal graph sequence obtained after completing the wind speed station data of the missing wind speed stations.
[0162] In order to further demonstrate the reliability of the data reconstruction provided by this application, this embodiment evaluates the quality of the reconstructed data through multiple indicators, including mean absolute error (MAE), mean square error (MSE), mean absolute percentage error (MAPE) and reconstruction accuracy. The specific formulas are shown in the following formulas (11) to (13).
[0163]
[0164]
[0165] in and are the predicted wind speed value and the ground truth value of station i at time j, respectively; Q is the length of the predicted time series, and N is the number of stations.
[0166] Using the trained spatiotemporal graph attention network, other complete node sequences are used as model input to obtain the corresponding missing station wind speed sequence output, which is compared with the real data. At the same time, simulation comparisons are performed with five baseline sequence filling strategies (neighbor mean filling strategy, feature propagation filling strategy, random filling strategy, mean filling strategy, and 5-layer graph convolution filling strategy) as shown below.
[0167] Reference Figure 10 , is a performance simulation diagram of the first spatiotemporal graph attention reconstruction model provided by the embodiment of this application. Figure 10 As shown in the figure, the performance of the "neighborhood mean filling" method for reconstructing missing wind speed data is demonstrated. The black curve in the figure represents the change of the "true value" of the wind speed over time, while the red curve represents the "neighborhood mean filling" result of using the average wind speed of neighboring stations to fill in the missing data. Figure 10 It can be seen that although the "neighborhood mean filling" can roughly follow the trend of the true value in some gently changing areas, there is a significant deviation between the reconstruction result and the true value in areas with large wind speed fluctuations or peaks and valleys, making it difficult to accurately capture the dynamic characteristics of wind speed. This reflects the limitations of traditional spatial interpolation methods when dealing with complex missing wind speed data.
[0168] Reference Figure 11 , is a performance simulation diagram of the second spatiotemporal graph attention reconstruction model provided by the embodiment of this application. Figure 11 The figure shows the effect of reconstructing wind speed data using the "feature propagation filling" method. The black curve in the figure represents the "true value" of the wind speed, and the red curve represents the result after filling the missing data through feature propagation. Compared with "neighborhood mean filling", "feature propagation filling" may take into account the relationship between nodes to a certain extent, but its reconstructed wind speed curve still has significant differences from the true value at multiple time points, especially in areas with rapid wind speed changes and extreme values. This shows that its ability to capture complex spatiotemporal dependencies and accurately reconstruct missing data is limited.
[0169] Reference Figure 12 , is a performance simulation diagram of the third spatiotemporal graph attention reconstruction model provided by the embodiment of this application. Figure 12 As shown in the figure, the performance of the "random filling" method for reconstructing missing wind speed data is demonstrated. The black curve in the figure represents the "true value" of the wind speed, while the red curve represents the "random filling" result of using random values to fill in the missing data. Figure 12As shown in , there is almost no correlation between the results of “random filling” and the true wind speed, and the reconstructed wind speed curve shows a high degree of disorder and inaccuracy.
[0170] Reference Figure 13 , is a performance simulation diagram of the fourth spatiotemporal graph attention reconstruction model provided by the embodiment of this application. Figure 13 Figure 2 demonstrates the performance of reconstructing missing wind speed data using a 5-layer graph convolutional network. The black curve represents the true wind speed, while the red curve represents the reconstructed wind speed after processing the 5-layer graph convolutional network. Because graph convolutional networks can leverage graph structure for feature learning, their reconstruction results are significantly improved compared to the simple infill method described above, better tracking the fluctuations in true wind speed.
[0171] Reference Figure 14 , is a performance simulation diagram of the fifth spatiotemporal graph attention reconstruction model provided by the embodiment of this application. Figure 14 The figure shows the performance of reconstructing missing wind speed data using a "mean filling" method (which may refer to using the mean of the entire series or the mean of a specific time window). The black curve represents the "true" wind speed, and the red curve represents the "mean filling" result. The reconstructed wind speed curve obtained by this method is typically smooth and far from reflecting the dynamic changes and detailed characteristics of the true wind speed. This is especially true during periods of severe wind speed fluctuations, when the difference from the true value is significant.
[0172] Reference Figure 15 , is a performance simulation diagram of the sixth spatiotemporal graph attention reconstruction model provided by the embodiment of this application. Figure 15 As shown in , the performance of reconstructing missing wind speed data using the spatiotemporal graph attention reconstruction network provided by this application is demonstrated. The black curve in the figure is the "true value" of the wind speed, and the red curve is the wind speed reconstructed by the 5-layer graph attention network. It can be clearly seen that the red curve is highly consistent with the black curve, and can very accurately capture the various fluctuations, peaks and valleys of the real wind speed, which is significantly better than other comparison methods. This proves that the spatiotemporal graph attention network provided by this application can effectively learn and utilize the complex dynamic spatiotemporal dependencies between the measuring points in the wind speed field through node relationship attention processing, thereby achieving high-precision reconstruction of missing wind speed station data, and providing a high-quality complete spatiotemporal graph sequence for subsequent wind speed data prediction results.
[0173] Reference Figure 16 , is a performance simulation diagram of the seventh spatiotemporal graph attention reconstruction model provided by the embodiment of this application. Figure 16As shown in , the performance of the spatiotemporal graph attention reconstruction network proposed in this application in reconstructing wind speed data over a longer time span (about 900 seconds) is demonstrated. The black curve in the figure represents the "true value" of the wind speed, and the red curve represents the reconstruction result of the model. The light-colored area around the two may represent uncertainty or error range. As can be seen from the figure, even in long time series, the red curve can still closely follow the complex changes of the black curve, including long-term trends and short-term sharp fluctuations, and the uncertainty ranges of the two also show good consistency. It shows the robustness and high precision of the spatiotemporal graph attention reconstruction network provided by this application in processing actual and continuous wind speed data, and can continuously and stably generate high-quality complete spatiotemporal graph sequences.
[0174] Through the training process described in steps 501 to 504 above, the network parameters of the network can capture complex spatiotemporal dependencies and use these relationships to accurately infer missing data, so that the trained spatiotemporal graph attention network can perform high-quality node relationship attention processing on the continuous spatiotemporal graph sequence containing missing wind speed stations, generate a complete spatiotemporal graph sequence containing accurately reconstructed data, and provide a more reliable and complete data foundation for subsequent wind speed prediction or other analysis tasks.
[0175] Step 103: Input the complete spatiotemporal graph sequence into the wind speed prediction model for data processing to obtain the wind speed data prediction result of the prediction scenario.
[0176] Step 103 is described in detail below.
[0177] In some embodiments, after obtaining a complete spatiotemporal graph sequence corresponding to data reconstruction in a prediction scenario, since the complete spatiotemporal graph sequence already contains the wind speed information of all wind speed stations in the prediction scenario (including wind speed stations that originally had missing data) and retains rich spatiotemporal structural characteristics, it is sent to a pre-built wind speed prediction model for further data processing (which includes complex operations such as feature extraction, pattern learning, and time series evolution inference), thereby outputting the wind speed data prediction results of the prediction scenario, that is, an accurate estimate of the wind speed values of each wind speed station in one or more future time steps.
[0178] In order to enable the wind speed prediction model to accurately predict wind speed data for the prediction scenario.
[0179] In this embodiment, a hybrid model of graph neural network (GNN) and time series Transformer is combined to construct a wind speed prediction model for wind speed sequence prediction, and data residual is used as the loss function of the neural network to train the neural network parameters. The trained neural network can be used to predict distributed wind speed.
[0180] In the wind speed prediction model, three embedding layers are designed to handle the embedding transformation of frequency components, trend components, and edge features, respectively. The frequency component embedding layer maps the decomposed frequency components into the model's hidden dimension space; the trend component embedding layer maps the main trend components of the time series into the model's hidden dimension space; and the edge feature embedding layer maps edge features that describe the relationships between nodes into the model's hidden dimension space.
[0181] The wind speed prediction model consists of multiple layers, each composed of an edge update function and a node update function. The edge update function uses a standard Transformer encoder layer with a full attention mechanism to handle edge feature updates. The node update function uses a Transformer encoder layer that combines a fast Fourier transform (FFT) attention mechanism with probabilistic attention and a layer with a logarithmic sparse attention pattern to improve the efficiency of processing long sequences.
[0182] The wind speed prediction model also defines a wavelet transform decomposition module and adds a prediction placeholder.
[0183] In the wind speed prediction model, the Adam optimizer is selected for model training, and the cosine annealing learning rate scheduling strategy is used. The mean square error (MSE) loss function is used.
[0184] During wind speed prediction model training, the reconstructed complete spatiotemporal graph sequence structure is partitioned into training datasets based on designed prediction windows. Three prediction windows are designed: 1-step prediction using a 30-marker step, 10-step prediction using a 30-marker step, and 30-step prediction using a 60-marker step. The dataset is divided into three parts: 60% for training, 20% for validation, and the remainder for testing. Wavelet transform is then applied to the input sequence to decompose the original time series into trend and frequency components, with placeholders added to the end of the decomposed sequence. The prepared trend, frequency, and edge features are then processed through their respective embedding layers. The embedded node and edge features are then reorganized into a graph structure for input into the graph neural network. The processed graph structure data is then fed into the graph neural network for forward propagation, generating a complete prediction sequence and attention weights. The corresponding prediction results are extracted based on the prediction length, with the output dimension being [batch size, prediction length, feature dimension], representing the predicted wind speed value for the next time step.
[0185] Each training process involves forward propagation to calculate predictions and losses, backpropagation to calculate gradients, an optimizer to update model parameters, evaluation of model performance on a validation set, adjustment of the learning rate based on validation set performance, and checking for early stopping conditions. After training, the model can accept wind speed data of any graph structure as input and predict wind speed values for future time steps.
[0186] Based on the wind speed prediction model constructed above, the following will further describe how to use the wind speed prediction model to predict wind speed data.
[0187] Reference Figure 17 , inputting the complete spatiotemporal graph sequence into the wind speed prediction model for data processing to obtain the wind speed data prediction result of the prediction scenario, including the following steps 1701 to 1703.
[0188] Step 1701: In the wind speed prediction model, after the complete space-time graph sequence is subjected to wavelet transform decomposition processing, a placeholder is added at the end to obtain the trend component and the frequency component.
[0189] Step 1702: embed the trend component and the frequency component to obtain embedded node features, and obtain graph structure data based on the embedded node features and the embedded edge features.
[0190] Step 1703: Input the graph structure data into the graph neural network for forward propagation processing to obtain the wind speed data prediction result.
[0191] Steps 1701 to 1703 are described in detail below.
[0192] In some embodiments, when the complete spatiotemporal graph sequence is input into the wind speed prediction model for data processing, the wind speed prediction model first pre-processes the time series data therein, that is, performs wavelet transform decomposition processing on the wind speed time series data in the complete spatiotemporal graph sequence. It can be understood that wavelet transform is a powerful signal analysis tool that can decompose the time series into different time-frequency domains, thereby effectively separating the different components of the signal. After this decomposition process, in order to facilitate the unified processing or sequence alignment of subsequent models, a placeholder is then added to the end of the decomposed sequence data. Through this series of operations, the original wind speed time series data is decomposed into trend components (representing the long-term changes and low-frequency characteristics of the signal) and frequency components (representing the short-term fluctuations and high-frequency details of the signal) that are easier for the model to learn.
[0193] After obtaining the trend component and frequency component, the trend component and frequency component are embedded separately (that is, the numerical or categorical (if applicable) components are mapped into a high-dimensional, dense vector space) to obtain embedded node features containing richer semantic information. These embedded node features represent the dynamic characteristics of each wind speed station at different time scales. At the same time, the model will also combine the connection relationship of the graph and the attributes of the edges, that is, the embedded edge features (these edge features may come from the edge features in the original graph construction phase, and are also embedded to match the dimension and representation of the node features), and combine the embedded node features with the topological structure of the graph to obtain graph structure data. This graph structure data contains both the dynamic characteristics of the nodes and the spatial association information between nodes.
[0194] After obtaining the graph data, it is fed into a Graph Neural Network (GNN). This network uses a message-passing mechanism to propagate and aggregate information between the graph nodes, performing forward propagation. This means that data flows through each layer of the GNN, with each layer updating its node representation based on information from neighboring nodes and its own characteristics. Through this multi-layered information aggregation and transformation, the GNN learns complex spatiotemporal dependencies and patterns, ultimately outputting a prediction of future wind speeds, essentially generating wind speed data forecasts.
[0195] Through the above steps 1701 to 1703, wavelet transform decomposition is used to enable the model to focus on the trends and fluctuation details in the wind speed data respectively, supplemented by placeholder processing, and then these decomposed components and side information are converted into high-dimensional features through embedding processing, and graph structure data containing rich spatiotemporal information is constructed. The powerful graph learning ability of the graph neural network is used to deeply process the graph structure data, thereby capturing complex spatiotemporal dynamics and generating accurate wind speed data prediction results, so that the model can more comprehensively understand the law of wind speed evolution, and ultimately achieve high-precision prediction of wind speed data in the prediction scenario.
[0196] Reference Figure 18 , is a schematic diagram of the structural framework of a wind speed prediction model based on a time-space graph sequence provided in an embodiment of the present application. Figure 18 As shown in , the "processed image sequence" (i.e., the complete spatiotemporal image sequence) is used as the model input. The model comprises two core modules: a spatial feature extraction module and a temporal feature extraction module. Working together, the model can simultaneously capture complex spatial dependencies and temporal dynamics, ultimately outputting a predicted image sequence—the wind speed data forecast for the predicted scenario.
[0197] To further demonstrate the reliability and accuracy of the data predictions provided by this application, the trained wind speed prediction model was compared with the model predictions using actual data from validation points. The model's prediction accuracy was evaluated across different prediction windows and compared to a baseline model. The original wind speed data from the test set was used as model input, and the output corresponding to the prediction window step size was obtained. Simulation comparisons of different sequence prediction models with the true values and the predictability of the reconstructed data were performed as shown below.
[0198] Reference Figure 19 , is a performance simulation diagram of the first wind speed prediction model based on a time-space graph sequence provided by the embodiment of the present application. Figure 19 As shown in , the performance of the wind speed prediction model in predicting the wind speed for the next 1 labeled step is demonstrated when a complete spatiotemporal graph sequence of 30 labeled steps is used as input. The black curve in the figure represents the "true value" of the wind speed, and the other colored curves represent the prediction outputs of different prediction models (such as LSTM, MLP, Transformer, Informer, Autoformer and the fast Fourier-Transformer network adopted in this solution, i.e., the wind speed prediction model). It can be seen that in the short-term single-step prediction, a variety of advanced models, especially the wind speed prediction model corresponding to the Transformer architecture proposed in this solution, can track the changing trend of the real wind speed well. This shows that the strategy of the present invention of inputting the complete spatiotemporal graph sequence into the wind speed prediction model for processing to obtain the wind speed data prediction result can achieve good prediction results in short-term prediction.
[0199] Reference Figure 20 , is a performance simulation diagram of the second wind speed prediction model based on a time-space graph sequence provided in the embodiment of the present application. Figure 20 As shown in , the prediction horizon is extended to 10 marked steps in the future. When the prediction step increases, the difference in prediction performance of different models becomes more obvious. The figure shows that although the prediction accuracy of all models has decreased compared to single-step prediction, advanced Transformer-based models (such as Transformer, Informer, Autoformer, Fast Fourier-Transformer network) can still more accurately capture the main fluctuation characteristics and trends of wind speed compared to LSTM and MLP, especially in the prediction of peak and valley values. This shows that the wind speed prediction model proposed in this application can effectively utilize the spatiotemporal information in the complete spatiotemporal graph sequence when processing medium-length multi-step prediction tasks, and provide relatively reliable wind speed data prediction results.
[0200] Reference Figure 21, is a performance simulation diagram of the third wind speed prediction model based on a time-space graph sequence provided in the embodiment of the present application. Figure 21 As shown in , the performance of the wind speed prediction model is demonstrated under the conditions of longer input sequences (60 labeled steps) and longer prediction horizons (30 labeled steps). With the significant increase in the prediction time, the prediction difficulty increases significantly, and the prediction errors of all models increase. However, it can still be seen from the figure that advanced models such as Autoformer and Fast Fourier-Transformer networks (i.e., the wind speed prediction model proposed in this application) show relatively stronger robustness in long-term predictions, and their prediction curves can still maintain a certain degree of consistency with the true value in terms of overall trends and some key fluctuations. This shows that the wind speed prediction model proposed in this application can still strive to extract effective information to generate more accurate wind speed data prediction results through deep spatiotemporal feature learning of the complete spatiotemporal graph sequence when dealing with challenging long-term wind speed prediction tasks.
[0201] Reference Figure 22 , is a performance simulation diagram of the fourth wind speed prediction model based on a time-space graph sequence provided by the embodiment of the present application. Figure 22 As shown in , the association between data reconstruction and subsequent predictions in the solution provided by this application and the effects of different prediction strategies are demonstrated. The blue curve (reconstructed data) and the black curve (true value) of the "marked sequence" in the figure are highly consistent in the historical data part, which shows the efficiency and accuracy of the spatiotemporal graph attention network in data reconstruction. Based on this high-quality reconstructed data (i.e., a complete spatiotemporal graph sequence), the prediction sequence output part compares the wind speed data prediction results obtained by various prediction strategies (such as a one-time prediction of 30 steps, 3 predictions of 10 steps each, and 30 predictions of 1 step each). It can be seen that different prediction strategies have an impact on the final prediction accuracy, but the premise is that it depends on the high-quality reconstructed data in the early stage. This proves the overall effectiveness of the technical route of this application by first accurately reconstructing and then predicting, and proves that a high-quality complete spatiotemporal graph sequence is the key foundation for achieving accurate wind speed data prediction results.
[0202] Reference Figure 23 , is a schematic diagram of a wind speed data prediction process for a prediction scenario provided by an embodiment of the present application. Figure 23As shown in , it is a comprehensive application scenario schematic diagram, which intuitively shows the complete implementation process and expected results of the wind speed data prediction method provided by this application in a specific prediction scenario (such as a mountainous environment along a railway, including stations A, B, C, D, E and their three-dimensional coordinates). The left side shows the distribution of the original wind speed signals containing multiple wind speed stations in a specific geographical environment, and the graph structure sequence formed by them in the time dimension, in which there is data missing (as shown by the light-colored nodes). In the middle, through the wind speed reconstruction process, the original signal sequence containing missing data is converted into a reconstructed data sequence with complete data (i.e., a complete space-time graph sequence). Subsequently, this reconstructed data is input for sequence prediction, and finally the wind speed data prediction results for a period of time in the future (t+1, t+2,…, t+P) are obtained.
[0203] The wind speed data prediction method, device, electronic device and storage medium proposed in the embodiments of the present application include: first, obtaining the three-dimensional spatial coordinates of multiple wind speed stations in the prediction scene, and performing weighted sum calculation based on the three-dimensional spatial coordinates and direction weights of each two wind speed stations to obtain the edge features between each two wind speed stations, and obtaining the graph connection threshold based on the difference between the three-dimensional spatial coordinates of each two wind speed stations and performing percentage processing, when the difference between the three-dimensional spatial coordinates of each two wind speed stations does not exceed the graph connection threshold, obtaining the weighted adjacent elements of each two wind speed stations based on the inverse of the edge feature, and combining all the weighted adjacent elements to obtain an adjacency matrix, and obtaining a degree matrix based on the sum of the elements in each column of the adjacency matrix, Normalization is performed based on the degree matrix to obtain a graph structure, and graph structures corresponding to multiple continuous times are combined to obtain a continuous spatiotemporal graph sequence, which includes an adjacency matrix. The continuous spatiotemporal graph sequence does not include the wind speed station data of the missing wind speed station, and the adjacency matrix includes weighted adjacent elements between the missing wind speed station and other wind speed stations; then, the continuous spatiotemporal graph sequence is input into the spatiotemporal graph attention network, and the wind speed station data of the missing wind speed station are subjected to node relationship attention processing based on weighted adjacent elements through multiple layers of cascaded graph attention layers to obtain a complete spatiotemporal graph sequence, which includes the wind speed station data of the missing wind speed station, wherein the training process of the spatiotemporal graph attention network includes obtaining multiple A training spatiotemporal graph sequence, the training spatiotemporal graph sequence includes multiple site data, missing site data, the adjacency weight matrix between the missing site and other sites, and the site label data corresponding to the missing site data. A node feature vector is generated based on the missing site data, and the attention parameters between the missing site and each other site are accumulated, and then multiplied by the adjacency weight matrix and the node feature vector of the previous graph attention layer to obtain the node feature update term. The activation function is processed based on the node feature update term to obtain the node feature update function of the current graph attention layer. The two norms of the edge weight matrix between the nodes are multiplied by the regularization coefficient to obtain the edge weight norm. The two norms of the differences of all data are averaged to obtain the data. The data difference norm is taken, the edge weight norm and the data difference norm are accumulated to obtain the loss function. The network parameters and node feature vectors of the spatiotemporal graph attention network are iteratively updated based on the node feature update function and the loss function. The network parameters after multiple iterative updates are used to perform node relationship attention processing on the continuous spatiotemporal graph sequence; finally, in the wind speed prediction model, the complete spatiotemporal graph sequence is decomposed by wavelet transform, and a placeholder is added at the end to obtain the trend component and frequency component. The trend component and frequency component are embedded to obtain the embedded node features, and based on the embedded node features and the embedded edge features, the graph structure data is obtained. The graph structure data is input into the graph neural network for forward propagation processing to obtain the wind speed data prediction results.
[0204] The embodiment of the present application constructs a continuous spatiotemporal graph sequence containing weighted adjacent elements, which can clarify the spatial topological relationship and potential impact intensity between each wind speed station from the initial stage, laying a structured foundation for subsequent processing, and then uses the spatiotemporal graph attention network to process the sequence containing missing data. Through the node relationship attention mechanism of the multi-layer graph attention layer, it can intelligently and dynamically learn and utilize the known station data and its spatiotemporal correlation to reconstruct the wind speed data of the missing stations with high precision, which is far superior to the traditional spatial interpolation method that only relies on fixed spatial distance or statistical characteristics, thereby obtaining a more realistic and complete spatiotemporal graph sequence. Afterwards, this high-quality complete spatiotemporal graph sequence is input into the subsequent wind speed prediction model, so that the prediction model can learn and infer based on more comprehensive and accurate spatiotemporal dependency information, so as to overcome the shortcomings of the existing technology in processing missing data and capturing complex dynamic spatiotemporal dependencies, thereby significantly improving the accuracy of wind speed data prediction in complex prediction scenarios (such as railway environments); in addition, by using threshold judgment and inverse calculation of edge features, The weighted adjacent elements in the adjacency matrix are accurately defined to reflect the connection strength between sites. Then, by calculating the degree matrix and performing normalization processing, a standardized graph structure is obtained, which facilitates subsequent model processing. The graph structures of multiple time points are organically combined to form a continuous spatiotemporal graph sequence that can comprehensively describe the spatiotemporal dynamic characteristics of the wind speed field, ensuring that the input spatiotemporal graph sequence can accurately capture the complex spatial dependencies and their temporal evolution, laying a solid data foundation for subsequent missing data reconstruction and high-precision wind speed prediction. In addition, the edge features obtained by introducing directional weight calculations are used to more finely characterize the spatial relationship between sites. By processing the percentage of the three-dimensional spatial coordinate difference, the graph connection threshold is adaptively determined, making the graph construction more robust. Then, by comprehensively utilizing this information, a continuous spatiotemporal graph sequence that can reflect the dynamic characteristics of the real wind speed field is generated, which can more accurately capture the complex interactions between the measuring points in the wind speed field, providing a solid foundation for subsequent high-precision data reconstruction and prediction, thereby improving the effectiveness and reliability of the overall prediction scheme.Moreover, by accumulating attention parameters and combining the adjacency weight matrix and the node feature vector of the previous layer, dynamic weighted aggregation of neighborhood information is realized, and the core node feature update item is obtained, so that the network can intelligently focus on the most valuable neighbors for information reconstruction of missing sites. Then, by introducing activation function processing, the necessary nonlinearity is introduced into the features of linear aggregation, thereby constructing a complete node feature update function of the current layer graph attention layer, so that the spatiotemporal graph attention network can abstract and refine the complex dependencies in the spatiotemporal graph data layer by layer, accurately estimate and fill in the wind speed data of missing sites, and ultimately improve the quality of data reconstruction. In addition, by calculating the edge weight norm and introducing the regularization coefficient, the risk of model overfitting is effectively suppressed, and the generalization ability of the model is enhanced. By calculating the second norm of all data differences and averaging them, a data difference norm that intuitively measures the model reconstruction performance is obtained. Combining these two factors creates the final loss function, enabling the spatiotemporal graph attention network to not only improve the accuracy of reconstructing missing wind speed data during training, but also avoid learning overly complex model parameters, thereby ensuring good performance on unseen data. This effectively improves the reliability of wind speed data reconstruction in practical applications. Furthermore, wavelet transform decomposition enables the model to focus on trends and fluctuation details in wind speed data separately, supplemented by placeholder processing. These decomposed components and side information are then transformed into high-dimensional features through embedding processing, constructing graph-structured data containing rich spatiotemporal information. Leveraging the powerful graph learning capabilities of graph neural networks, this graph-structured data is deeply processed to capture complex spatiotemporal dynamics and generate accurate wind speed data prediction results. This allows the model to more comprehensively understand the laws of wind speed evolution and ultimately achieve high-precision predictions of wind speed data for the forecast scenario.
[0205] An embodiment of the present application further provides an electronic device, including:
[0206] at least one memory;
[0207] at least one processor;
[0208] at least one program;
[0209] The program is stored in the memory, and the processor executes the at least one program to implement the wind speed data prediction method described above. The electronic device can be any smart terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a car computer, etc.
[0210] See also Figure 24 , Figure 24 The hardware structure of an electronic device according to another embodiment is shown. The electronic device includes:
[0211] The processor 2401 can be implemented using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0212] The memory 2402 can be implemented in the form of ROM (Read Only Memory), static storage device, dynamic storage device or RAM (Random Access Memory). The memory 2402 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 2402 and is called by the processor 2401 to execute the wind speed data prediction method of the embodiments of this application.
[0213] Input / output interface 2403, used to implement information input and output;
[0214] Communication interface 2404, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);
[0215] Bus 2405 , which transmits information between various components of the device (e.g., processor 2401 , memory 2402 , input / output interface 2403 , and communication interface 2404 );
[0216] The processor 2401 , the memory 2402 , the input / output interface 2403 and the communication interface 2404 are connected to each other in communication within the device via the bus 2405 .
[0217] An embodiment of the present application further provides a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is executed by a processor, the above-mentioned wind speed data prediction method is implemented.
[0218] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0219] The embodiments described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0220] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0221] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0222] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.
[0223] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0224] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0225] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0226] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0227] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0228] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes multiple instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0229] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.
Claims
1. A wind speed data prediction method, characterized in that: The method comprises: Obtaining three-dimensional spatial coordinates of a plurality of wind speed stations in a prediction scenario, and constructing a continuous spatiotemporal graph sequence in the prediction scenario based on the plurality of three-dimensional spatial coordinates, wherein the continuous spatiotemporal graph sequence includes an adjacency matrix, the continuous spatiotemporal graph sequence does not include wind speed station data of missing wind speed stations, and the adjacency matrix includes weighted adjacency elements between the missing wind speed stations and the other wind speed stations; Inputting the continuous spatiotemporal graph sequence into a spatiotemporal graph attention network, sequentially performing node relationship attention processing on the wind speed station data of the missing wind speed station based on the weighted adjacent elements through multiple cascaded graph attention layers to obtain a complete spatiotemporal graph sequence, wherein the complete spatiotemporal graph sequence includes the wind speed station data of the missing wind speed station; The complete spatiotemporal graph sequence is input into a wind speed prediction model for data processing to obtain a wind speed data prediction result of the prediction scenario.
2. The wind speed data prediction method according to claim 1, characterized in that: The constructing a continuous spatiotemporal graph sequence in the prediction scene based on the plurality of three-dimensional space coordinates includes: Performing weighted sum calculation based on the three-dimensional spatial coordinates and direction weights of each two wind speed stations to obtain edge features between each two wind speed stations; Obtaining a graph connection threshold based on a difference between the three-dimensional space coordinates of every two wind speed stations and performing percentage processing; The continuous spatiotemporal graph sequence is obtained based on the graph connectivity threshold and the edge features.
3. The wind speed data prediction method according to claim 2, characterized in that: The obtaining of the continuous spatiotemporal graph sequence based on the graph connection threshold and the edge feature includes: When the difference between the three-dimensional space coordinates of each two wind speed stations does not exceed the graph connection threshold, obtaining the weighted adjacent elements of each two wind speed stations based on the inverse of the edge feature, and combining all the weighted adjacent elements to obtain an adjacency matrix; Obtaining a degree matrix based on the sum of the elements in each column of the adjacency matrix; Performing normalization processing based on the degree matrix to obtain a graph structure; The continuous spatiotemporal graph sequence is obtained by combining graph structures corresponding to multiple continuous times.
4. The wind speed data prediction method according to claim 1, characterized in that: The training process of the spatiotemporal graph attention network includes: Acquire multiple training spatiotemporal graph sequences, wherein the training spatiotemporal graph sequences include multiple site data, missing site data, an adjacency weight matrix between the missing site and other sites, and site label data corresponding to the missing site data; Generate a node feature vector based on the missing site data, and construct a node feature update function for each graph attention layer in the spatiotemporal graph attention network based on the node feature vector, the adjacency matrix, and the attention parameter of the spatiotemporal graph attention network; Constructing a loss function based on the data difference between the node feature vector and the site label data; The network parameters of the spatiotemporal graph attention network and the node feature vector are iteratively updated based on the node feature update function and the loss function, and the network parameters after multiple iterative updates are used to perform node relationship attention processing on the continuous spatiotemporal graph sequence.
5. The wind speed data prediction method according to claim 4, characterized in that: The generating of a node feature vector based on the missing site data, and constructing a node feature update function for each graph attention layer in the spatiotemporal graph attention network based on the node feature vector, the adjacency matrix, and the attention parameter of the spatiotemporal graph attention network, includes: Accumulate the attention parameters between the missing site and each other site, and then multiply them by the adjacency weight matrix and the node feature vector of the previous graph attention layer to obtain a node feature update term; An activation function is performed based on the node feature update item to obtain the node feature update function of the current layer graph attention layer.
6. The wind speed data prediction method according to claim 4, characterized in that: The constructing of a loss function based on the data difference between the node feature vector and the site label data includes: Based on the bi-norm of the edge weight matrix between nodes, multiplied by the regularization coefficient, the edge weight norm is obtained; Based on the binary norm of all the data differences, an average process is performed to obtain a data difference norm; The loss function is obtained by accumulating the edge weight norm and the data difference norm.
7. The wind speed data prediction method according to claim 4, characterized in that: The iteratively updating the network parameters of the spatiotemporal graph attention network and the node feature vector based on the node feature update function and the loss function includes: Performing relational attention processing on the input data using the node feature update function of the graph attention layer to obtain output data, wherein the input data of the first graph attention layer is the node feature vector, the input data of the next graph attention layer is the output data of the previous graph attention layer, and the output data of the last graph attention layer is the reconstructed site data of the missing site; The network parameters of the graph attention layer are updated based on the output data and the loss function.
8. The wind speed data prediction method according to claim 1, characterized in that: The step of inputting the complete spatiotemporal graph sequence into a wind speed prediction model for data processing to obtain a wind speed data prediction result for the prediction scenario includes: In the wind speed prediction model, after the complete spatiotemporal graph sequence is subjected to wavelet transform decomposition processing, a placeholder is added at the end to obtain a trend component and a frequency component; Embedding the trend component and the frequency component to obtain embedded node features, and obtaining graph structure data based on the embedded node features and the embedded edge features; The graph structure data is input into the graph neural network for forward propagation processing to obtain the wind speed data prediction result.
9. An electronic device, characterized in that: The invention comprises a memory and a processor, wherein the memory stores a computer program, and is characterized in that when the processor executes the computer program, the wind speed data prediction method according to any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the wind speed data prediction method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Coastal station wind speed prediction method based on Top-K space-time diagram attention network
CN118656776A
Wind speed prediction method based on sparse attention mechanism and three-dimensional convolution
CN119106321A
Wind power plant wind speed prediction method based on space-time diagram neural network, medium and equipment
CN119357605A