Wind speed data prediction methods, devices, electronic equipment and storage media
By constructing a continuous spatiotemporal graph sequence and a spatiotemporal graph attention network, the accuracy problem caused by missing wind speed data in complex prediction scenarios is solved, and high-precision wind speed data prediction is achieved.
Patent Information
- Application Number
- CN202510667380.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-05-21
AI Technical Summary
Existing technologies suffer from low accuracy in wind speed prediction in complex forecasting scenarios due to missing data, making it difficult to effectively capture the complex dynamic spatiotemporal dependencies between various measuring points in the wind speed field.
A continuous spatiotemporal graph sequence containing weighted adjacency elements is constructed. A spatiotemporal graph attention network is used to process the node relationships of missing wind speed station data through multi-layer cascaded graph attention layers. The complete spatiotemporal graph sequence is then reconstructed and input into the wind speed prediction model for data processing.
It significantly improves the accuracy of wind speed data prediction in complex forecasting scenarios. By clarifying the spatial topological relationship and potential impact intensity between wind speed stations and dynamically learning the spatiotemporal correlation, it achieves high-precision reconstruction and prediction of missing data.
Smart Images

Figure CN120687759B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and particularly relates to a wind speed data prediction method and device, electronic equipment and a storage medium. BACKGROUND
[0002] Wind speed data prediction is a process of estimating and predicting future wind speed by using historical wind speed data and related meteorological data, etc. In related technologies, for wind speed data prediction of complex prediction scenarios (such as railway environment), since there is a situation of missing detection data, a spatial interpolation method (such as Kriging interpolation, inverse distance weighting method, nearest neighbor mean, etc.) is usually used to complete the missing data, and then a traditional time series modeling (such as ARIMA, autoregressive moving average, LSTM, etc.) is used for wind speed prediction. However, these reconstruction and prediction methods only focus on single-dimensional data of time or space, which makes it difficult to effectively capture the complex dynamic spatio-temporal dependence relationship between each measuring point in the wind speed field, and makes the prediction accuracy of wind speed prediction for complex prediction scenarios relatively low. SUMMARY
[0003] The wind speed data prediction method and device, electronic equipment and storage medium provided by the embodiments of the present application can improve the wind speed prediction accuracy for complex prediction scenarios.
[0004] To achieve the above object, a first aspect of the embodiments of the present application provides a wind speed data prediction method, which comprises:
[0005] obtaining three-dimensional space coordinates of multiple wind speed sites in a prediction scenario, and constructing a continuous spatio-temporal graph sequence in the prediction scenario based on the multiple three-dimensional space coordinates, the continuous spatio-temporal graph sequence comprising an adjacency matrix, the continuous spatio-temporal graph sequence not comprising wind speed site data of a missing wind speed site, and the adjacency matrix comprising weight adjacency elements between the missing wind speed site and other wind speed sites;
[0006] inputting the continuous spatio-temporal graph sequence into a spatio-temporal graph attention network, sequentially passing through multiple cascaded graph attention layers to perform node relationship attention processing on the wind speed site data of the missing wind speed site based on the weight adjacency elements, and obtaining a complete spatio-temporal graph sequence, the complete spatio-temporal graph sequence comprising the wind speed site data of the missing wind speed site;
[0007] inputting the complete spatio-temporal graph sequence into a wind speed prediction model for data processing, and obtaining a wind speed data prediction result of the prediction scenario.
[0008] In some embodiments, the step of constructing the continuous spatio-temporal graph sequence in the prediction scenario based on the multiple three-dimensional space coordinates comprises:
[0009] weighting and calculating based on the three-dimensional spatial coordinates and the direction weight of each two of the wind speed sites, to obtain an edge feature between each two of the wind speed sites;
[0010] obtaining a graph connection threshold based on a difference between the three-dimensional spatial coordinates of each two of the wind speed sites and performing percentage processing;
[0011] obtaining the continuous spatio-temporal graph sequence based on the graph connection threshold and the edge feature.
[0012] In some embodiments, the obtaining the continuous spatio-temporal graph sequence based on the graph connection threshold and the edge feature comprises:
[0013] when the difference between the three-dimensional spatial coordinates of each two of the wind speed sites does not exceed the graph connection threshold, obtaining the weight adjacency element of each two of the wind speed sites based on the reciprocal of the edge feature, and combining all the weight adjacency elements to obtain an adjacency matrix;
[0014] obtaining a degree matrix based on the sum of each column element in the adjacency matrix;
[0015] performing normalization processing based on the degree matrix to obtain a graph structure;
[0016] combining the graph structures corresponding to multiple continuous times to obtain the continuous spatio-temporal graph sequence.
[0017] In some embodiments, the training process of the spatio-temporal graph attention network comprises:
[0018] obtaining multiple training spatio-temporal graph sequences, the training spatio-temporal graph sequences comprising multiple site data, missing site data, adjacency weight matrix between the missing site data and other sites, and site label data corresponding to the missing site data;
[0019] generating a node feature vector based on the missing site data, and constructing a node feature update function of each graph attention layer in the spatio-temporal graph attention network based on the node feature vector, the adjacency matrix, and attention parameters of the spatio-temporal graph attention network;
[0020] constructing a loss function based on a data difference between the node feature vector and the site label data;
[0021] iteratively updating network parameters of the spatio-temporal graph attention network and the node feature vector based on the node feature update function and the loss function, and the network parameters after multiple iterative updates are used for node relationship attention processing of the continuous spatio-temporal graph sequence.
[0022] In some embodiments, the node feature vector is generated based on the missing station data, and a node feature update function of each graph attention layer in the spatio-temporal graph attention network is constructed based on the node feature vector, the adjacency matrix, and attention parameters of the spatio-temporal graph attention network, including:
[0023] The attention parameters between the missing station and each other station are accumulated, and then multiplied by the adjacency weight matrix and the node feature vector of the previous layer graph attention layer to obtain a node feature update term;
[0024] The node feature update term is processed by an activation function to obtain the node feature update function of the current layer graph attention layer.
[0025] In some embodiments, the loss function is constructed based on the data difference between the node feature vector and the station label data, including:
[0026] The edge weight norm is obtained based on the two-norm of the edge weight matrix between nodes and multiplied by a regularization coefficient;
[0027] The data difference norm is obtained by averaging the two-norm of all data differences;
[0028] The loss function is obtained by accumulating the edge weight norm and the data difference norm.
[0029] In some embodiments, the network parameters of the spatio-temporal graph attention network and the node feature vector are iteratively updated based on the node feature update function and the loss function, including:
[0030] The input data is processed by relationship attention using the node feature update function of the graph attention layer to obtain output data, the input data of the first graph attention layer is the node feature vector, the input data of the subsequent 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 station data of the missing station;
[0031] The network parameters of the graph attention layer are updated based on the output data and the loss function.
[0032] In some embodiments, the wind speed data prediction result of the prediction scenario is obtained by inputting the complete spatio-temporal graph sequence into the wind speed prediction model for data processing, including:
[0033] In the wind speed prediction model, the complete spatio-temporal graph sequence is decomposed and processed by wavelet transform, and a placeholder is added at the end to obtain a trend component and a frequency component;
[0034] The trend component and the frequency component are embedded to obtain embedded node features, and based on the embedded node features and embedded edge features, graph structure data is obtained;
[0035] The graph structure data is input into a graph neural network for forward propagation processing to obtain the wind speed data prediction result.
[0036] To achieve the above object, a second aspect of embodiments of the present application proposes an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the wind speed data prediction method as described in the first aspect when executing the computer program.
[0037] To achieve the above object, a third aspect of embodiments of the present application proposes a storage medium, which is a computer readable storage medium, the storage medium stores a computer program, and the computer program is executed by a processor to implement the wind speed data prediction method as described in the first aspect.
[0038] The wind speed data prediction method, device, electronic equipment and storage medium provided by the embodiment of the application, the method comprises: first, obtaining three-dimensional space coordinates of a plurality of wind speed sites in a prediction scene, and constructing a continuous space-time graph sequence in the prediction scene based on the plurality of three-dimensional space coordinates, the continuous space-time graph sequence comprising an adjacency matrix, the continuous space-time graph sequence not comprising wind speed site data of a missing wind speed site, and the adjacency matrix comprising weight adjacency elements between the missing wind speed site and other wind speed sites; then, inputting the continuous space-time graph sequence into a space-time graph attention network, and sequentially performing node relationship attention processing on the wind speed site data of the missing wind speed site based on the weight adjacency elements through a plurality of cascaded graph attention layers to obtain a complete space-time graph sequence, the complete space-time graph sequence comprising the wind speed site data of the missing wind speed site; and finally, inputting the complete space-time graph sequence into a wind speed prediction model for data processing to obtain a wind speed data prediction result of the prediction scene. The embodiment of the application can clearly determine the spatial topological relationship and potential influence strength between the wind speed sites from the initial stage by constructing the continuous space-time graph sequence comprising the weight adjacency elements, thereby laying a structured foundation for subsequent processing. Then, the space-time graph attention network is used to process the sequence comprising the missing data, and through the node relationship attention mechanism of the plurality of graph attention layers, the known site data and the space-time correlation thereof can be intelligently and dynamically learned and utilized to reconstruct the wind speed data of the missing site with high precision, which is much better than the way of only relying on the fixed spatial distance or the statistical characteristics of the traditional spatial interpolation method, so that a more real and complete space-time graph sequence is obtained. Then, the high-quality complete space-time 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 space-time dependence information, so that the deficiencies of the prior art in processing missing data and capturing complex dynamic space-time dependence relationship can be overcome, thereby significantly improving the accuracy of wind speed data prediction in a complex prediction scene (such as a railway environment).
[0039] Other features and advantages of the present application will be set forth in the following description, and in part will be apparent from the description, or can be learned by practice of the present application. The objects and other advantages of the present application will be realized and attained by the structure particularly pointed out in the description and claims of the present application. BRIEF DESCRIPTION OF DRAWINGS
[0040] Figure 1 is a flowchart of a wind speed data prediction method provided by an embodiment of the present application.
[0041] Figure 2 is Figure 1 is a flowchart of step 101 in the method.
[0042] Figure 3 is Figure 2 is a flowchart of step 203 in the method.
[0043] Figure 4 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 is a training flowchart of a spatiotemporal graph attention network provided by another embodiment of the present application.
[0045] Figure 6 is Figure 5 is a flowchart of step 502 in the method.
[0046] Figure 7 is Figure 5 is a flowchart of step 503 in the method.
[0047] Figure 8 is Figure 5 is a flowchart of step 504 in the method.
[0048] Figure 9 is a structural framework schematic diagram of a spatiotemporal graph attention reconstruction model provided by another embodiment of the present application.
[0049] Figure 10 is a performance simulation schematic diagram of a first spatiotemporal graph attention reconstruction model provided by another embodiment of the present application.
[0050] Figure 11 is a performance simulation schematic diagram of a second spatiotemporal graph attention reconstruction model provided by another embodiment of the present application.
[0051] Figure 12 is a performance simulation schematic diagram of a third spatiotemporal graph attention reconstruction model provided by another embodiment of the present application.
[0052] Figure 13 is a performance simulation schematic diagram of a fourth spatiotemporal graph attention reconstruction model provided by another embodiment of the present application.
[0053] Figure 14 is a performance simulation schematic diagram of a fifth spatiotemporal graph attention reconstruction model provided by another embodiment of the present application.
[0054] Figure 15 is a performance simulation schematic diagram of a sixth spatiotemporal graph attention reconstruction model provided by another embodiment of the present application.
[0055] Figure 16 is a performance simulation schematic diagram of a seventh spatiotemporal graph attention reconstruction model provided by another embodiment of the present application.
[0056] Figure 17 is Figure 1 is a flowchart of step 103 in the method.
[0057] Figure 18 is a structural framework schematic diagram of a wind speed prediction model based on a spatiotemporal graph sequence provided by another embodiment of the present application.
[0058] Figure 19 is a performance simulation schematic diagram of a first wind speed prediction model based on a spatiotemporal graph sequence provided by another embodiment of the present application.
[0059] Figure 20 is a performance simulation schematic diagram of a second wind speed prediction model based on a spatiotemporal graph sequence provided by another embodiment of the present application.
[0060] Figure 21 is a performance simulation schematic diagram of a third wind speed prediction model based on a spatiotemporal graph sequence provided by another embodiment of the present application.
[0061] Figure 22 is a performance simulation schematic diagram of a fourth wind speed prediction model based on a spatiotemporal graph sequence provided by another embodiment of the present application.
[0062] Figure 23 is a wind speed data prediction flowchart of a prediction scenario provided by another embodiment of the present application.
[0063] Figure 24 is a hardware structure schematic diagram of an electronic device provided by another embodiment of the present application. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.
[0065] It should be noted that although the functional modules are divided in the device schematic diagram, and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed 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 one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0067] Wind speed data prediction is a process of estimating and predicting future wind speed by using historical wind speed data and related meteorological data, etc. In the related art, for wind speed data prediction in complex prediction scenarios (such as railway environment), due to the existence of missing detection data, a spatial interpolation method (such as Kriging interpolation, inverse distance weighting method, nearest neighbor mean, etc.) is usually used to complete the missing data, and then a traditional time series modeling (such as ARIMA, autoregressive moving average, LSTM, etc.) is used for wind speed prediction. However, these reconstruction and prediction methods only focus on single-dimensional data in time or space, which makes it difficult to effectively capture the complex dynamic spatio-temporal dependence relationship between each measuring point in the wind speed field, resulting in low prediction accuracy for wind speed prediction in complex prediction scenarios.
[0068] In order to improve the wind speed prediction accuracy in complex prediction scenarios, the embodiment of the present application can explicitly determine the spatial topological relationship and potential influence strength between each wind speed station from the initial stage by constructing a continuous spatio-temporal graph sequence containing weight adjacent elements, thereby laying a structured foundation for subsequent processing. Then, the spatio-temporal graph attention network is used to process the sequence containing missing data, and through the node relationship attention mechanism of the multi-layer graph attention layer, the known station data and its spatio-temporal correlation can be intelligently and dynamically learned and utilized to reconstruct the wind speed data of the missing station with high precision, which is much better than the way of relying only on fixed spatial distance or statistical characteristics of the traditional spatial interpolation method. Therefore, a more real and complete spatio-temporal graph sequence is obtained, and then the high-quality complete spatio-temporal 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 spatio-temporal dependence information. As a result, the deficiencies of the prior art in handling missing data and capturing complex dynamic spatio-temporal dependence relationship can be overcome, thereby significantly improving the accuracy of wind speed data prediction in complex prediction scenarios (such as railway environment).
[0069] The wind speed data prediction method, device, electronic equipment and storage medium provided by the embodiment of the present application are described below. The wind speed data prediction method provided in the embodiment of the present application can be applied to any server or computing processor with computing resources, etc.
[0070] The wind speed data prediction method in the embodiment of the present application will be described in detail below. Referring to Figure 1 , an optional flowchart of the wind speed data prediction method provided by the embodiment of the present application is shown in Figure 1 , which can include but is not limited to steps 101 to 103. It can be understood that the order of steps 101 to 103 in Figure 1 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: Obtain the three-dimensional spatial coordinates of multiple wind speed sites in the predicted scene, and construct a continuous spatio-temporal graph sequence in the predicted scene based on the multiple three-dimensional spatial coordinates.
[0072] The following describes step 101 in detail.
[0073] In some embodiments, in response to a wind field data prediction request for a predicted scene, the three-dimensional spatial coordinates of multiple wind speed sites distributed within the predicted scene and wind speed measurement data are first obtained, which typically includes key geographical location information such as the longitude, latitude, and altitude of each site. The equivalent latitude and longitude of the site are taken as the x and y directions, respectively, and the altitude of the wind speed measurement site from the ground is taken as the z direction. Each wind speed measurement site is represented as a node in the graph, and each node has a three-dimensional coordinate feature corresponding to the three-dimensional spatial coordinates (longitude, latitude, and altitude).
[0074] Based on these accurate multiple three-dimensional spatial coordinates, a structured data representation in the predicted scene, i.e., a continuous spatio-temporal graph sequence, will be further constructed. The continuous spatio-temporal graph sequence here refers to a series of graph structures evolving over time, where each graph represents a time snapshot, and the nodes in the graph correspond to the wind speed sites, while the edges represent the spatial relationship between the sites. The key component of the continuous spatio-temporal graph sequence is the adjacency matrix, which mathematically describes the connectivity between the nodes in the graph.
[0075] Since in a complex predicted scene (such as a railway scene), it is easy to have missing measurement data for a certain site, therefore in the initial construction stage, the continuous spatio-temporal graph sequence does not yet include the wind speed site data for those wind speed sites with actual observation data missing. However, the adjacency matrix design takes into account this data missing situation, and still includes the weight adjacency elements between the missing wind speed sites and other wind speed sites, which are specific numerical values in the adjacency matrix, quantifying the pre-set spatial correlation strength or potential impact degree between the missing site and other sites, providing a basis for subsequent data reconstruction.
[0076] Referring to Figure 2 , the continuous spatio-temporal graph sequence in the predicted scene is constructed based on the multiple three-dimensional spatial coordinates, including the following steps 201 to 203.
[0077] Step 201: Calculate the edge feature between each two wind speed sites based on the three-dimensional spatial coordinates and directional weight of each two wind speed sites.
[0078] Step 202: Obtain the graph connection threshold based on the difference between the three-dimensional spatial coordinates of each two wind speed sites and percentage processing.
[0079] Step 203: Obtain a continuous spatio-temporal graph sequence based on the graph connection threshold and the edge feature.
[0080] The steps 201 to 203 are described in detail below.
[0081] In some embodiments, in order to quantify the spatial relationship strength between any two wind speed sites in the prediction scenario, a weighted sum calculation is performed based on the accurate three-dimensional spatial coordinates (such as longitude, latitude and height) of each two wind speed sites and a preset "direction weight", and the edge feature between each two wind speed sites can be obtained as shown in the following formula (1).
[0082] d ij = a | Δx | + β | Δy | + γ | Δz | (1)
[0083] The direction weight (a, β, γ) = (0.2, 0.2, 0.6) means that different importance coefficients are given to different spatial dimensions (corresponding to the influence weight of longitude, latitude and height on wind speed) to reflect their differences in the influence on wind speed, and the height factor has the largest weight.
[0084] Through such a weighted sum calculation, for example, using the weighted Euclidean distance formula, the edge feature between each two wind speed sites can be obtained, which is a comprehensive measure of the spatial distance or similarity between the two sites, not just a simple geometric distance, but also considers the weighted results of different direction factors, providing basic edge attribute information for the subsequent construction of 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 determined in advance. 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 the differences in longitude, latitude and height are calculated respectively, and then the difference distribution is processed by percentage, thereby obtaining the graph connection threshold corresponding to each direction (including longitude, latitude and height) as shown in the following formula (2) to formula (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 generally refers to using the percentile method, for example, selecting the difference of a certain percentile (such as 85% or 95%) as the connection threshold in the corresponding direction. In this way, the system can adaptively determine the tolerance of connection in different spatial dimensions according to the distribution characteristics of the data itself, so as to obtain one or more graph connection thresholds. In the present embodiment, the 85% percentile value is used for the height difference, and the 95% percentile value is used for the horizontal distance (longitude and latitude).
[0090] Next, the generated graph connection threshold and edge feature between each two stations are further utilized to finally construct a continuous spatio-temporal graph sequence in the prediction scenario, so that a graph representing the spatial structure of the wind speed field at a single time point can be constructed. Since the wind speed data changes over time, such a graph structure will be constructed for each observation time point. These time-sequentially arranged graph structures are combined to form a continuous spatio-temporal graph sequence, which can dynamically reflect the evolution of the wind speed field in time and space. How to utilize the graph connection threshold and edge feature between each two stations to construct a continuous spatio-temporal graph sequence in the prediction scenario will be further described below.
[0091] With reference to Figure 3 , based on the graph connection threshold and the edge feature, the continuous spatio-temporal 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 weight adjacency element of each two wind speed stations is obtained based on the reciprocal of the edge feature, and all weight adjacency elements are combined to obtain an adjacency matrix.
[0093] Step 302: Based on the sum of each column element in the adjacency matrix, a degree matrix is obtained.
[0094] Step 303: Based on the degree matrix, a normalization processing is performed to obtain a graph structure.
[0095] Step 304: Based on the combination of the graph structures corresponding to multiple continuous times, a continuous spatio-temporal graph sequence is obtained.
[0096] The steps 301 to 304 are described in detail as follows.
[0097] In some embodiments, in order to construct the continuous spatio-temporal graph sequence in the predicted scenario, it is first necessary to construct the adjacency matrix corresponding to the graph to be weighted in the predicted scenario. When constructing the adjacency matrix, it is judged 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, i.e. 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 a connection should be established in the graph. At this time, the weight adjacency element between them will be calculated based on the reciprocal of the edge feature between the two stations, as shown in the following formula (5).
[0098]
[0099] By calculating such weight adjacency elements for all station pairs that meet the conditions, and arranging and combining these elements according to the station numbers, a complete adjacency matrix W is finally formed. Each element value of the adjacency matrix W is the connection strength or weight w 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 the 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 each column element in the adjacency matrix, as shown in the following formula (6).
[0102]
[0103] For any node (i.e. corresponding wind speed station) in the graph, 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] Further, in order to eliminate the influence of the degree difference of the nodes in the graph and make the representation of the graph more suitable for subsequent model processing such as graph neural network, the adjacency matrix W will be normalized based on the obtained degree matrix D, as shown in the following formula (7).
[0105]
[0106] Through this normalization operation, a normalized graph representation, i.e. graph structure, can be obtained. This normalized graph structure can better balance the weight of information transmission between different nodes, and help to improve the performance and stability of the graph learning algorithm.
[0107] Since the wind speed monitoring data is continuously collected at different time points, the graph structure at a single time point can only reflect the spatial distribution characteristics at that time. Therefore, in order to capture the dynamic characteristics of the wind speed field over time, the graph structures corresponding to multiple consecutive times are combined. These time-ordered, independent graph structures are sequentially combined together, and finally a continuous spatiotemporal graph sequence in the form of dynamic graph representation is obtained, which not only contains the spatial connection information at each time, but also embodies the evolution process of the spatial structure and node attributes over time. For example, the wind speed measured in the measurement area is measured for 120 seconds, and the total measurement time is 90 minutes. Each 1 second forms a graph structure. The original time sequence is converted into a spatiotemporal graph sequence.
[0108] By performing the above steps 301 to 304, the weight adjacency elements in the adjacency matrix are accurately defined by using threshold judgment and edge feature reciprocal calculation, reflecting the connection strength between stations. Then, by calculating the degree matrix and performing normalization processing, the normalized graph structure is obtained, which provides convenience for subsequent model processing. Moreover, the graph structures at 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 dependence and its temporal evolution, thereby laying a solid data foundation for subsequent missing data reconstruction and high-precision wind speed prediction.
[0109] Referring to Figure 4 is a schematic diagram of a distributed station coordinate graph structuring and graph embedding framework provided by an embodiment of the present application. As shown in Figure 4 , it is shown that 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 the corresponding directional weights (a, b, g) of the multiple wind speed stations in the predicted scenario. Subsequently, based on the input graph connection thresholds (Tx, Ty, Tz) in three directions and the preset weights (Wx, Wy, Wz), and in combination with the calculated edge features, the weight adjacency elements are determined, and then the weighted adjacency matrix is formed. After normalization processing, the final graph structure is obtained, which lays the foundation for the graph representation of a single time step for subsequent construction of a continuous spatiotemporal graph sequence.
[0110] By performing the above steps 201 to 203, the edge features calculated by introducing directional weights more finely depict the spatial relationship between stations, and the graph connection thresholds are adaptively determined by processing the percentage of three-dimensional spatial coordinate differences, making the graph construction more robust. By comprehensively utilizing these information, a continuous spatiotemporal graph sequence is generated, which can reflect the dynamic characteristics of the real wind speed field and more accurately capture the complex interactions between each measurement point in the wind speed field, thereby providing a solid foundation for subsequent high-precision data reconstruction and prediction, and 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 sequentially pass through multiple cascaded graph attention layers to perform node relationship attention processing on the wind speed site data of the missing wind speed site based on the weight adjacency elements, to obtain a complete spatiotemporal graph sequence.
[0112] The following describes step 102 in detail.
[0113] In some embodiments, based on the constructed continuous spatiotemporal graph sequence, which carries information about the network topology of multiple wind speed sites in the prediction scenario, but part of the site data is missing, it will be fed as input into a specially designed spatiotemporal graph attention network.
[0114] The spatiotemporal graph attention network is composed of multiple cascaded graph attention layers, and each layer of graph attention layer processes the input graph data. The core processing process is to perform node relationship attention processing on the wind speed site data of the missing wind speed site based on the weight adjacency elements defined in the adjacency matrix. This node relationship attention processing can dynamically evaluate and weight the contribution of adjacent nodes to the target missing site, so as to learn and capture complex spatiotemporal dependencies.
[0115] Through iterative feature propagation and update by sequentially passing through these multiple cascaded graph attention layers, the spatiotemporal graph attention network can intelligently and accurately reconstruct the missing wind speed data. The final output is a complete spatiotemporal graph sequence, which is mainly different from the input in that it now includes the wind speed site data of the originally missing wind speed site obtained by network reconstruction, so that the entire dataset becomes complete in the spatiotemporal dimension.
[0116] In order to enable the actual spatiotemporal graph attention network to effectively reconstruct the data of the missing wind speed site in the continuous spatiotemporal graph sequence, the spatiotemporal graph attention network needs to be trained accordingly in advance, as described below.
[0117] Referring to Figure 5 , the training process of the spatiotemporal graph attention network includes the following steps 501 to 504.
[0118] Step 501: obtain multiple training spatiotemporal graph sequences, which include multiple site data, missing site data, adjacency weight matrix between missing sites and other sites, and site label data corresponding to the missing site data.
[0119] Step 502: 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 parameters of the spatiotemporal graph attention network.
[0120] The steps 501 to 502 are described in detail below.
[0121] In some embodiments, when training the spatio-temporal graph attention network, a plurality of training spatio-temporal graph sequences are first needed to guide the spatio-temporal graph attention network to learn how to reconstruct the missing information. Specifically, these training spatio-temporal graph sequences contain: a plurality of site data, i.e., known observation values or features of all wind speed sites in the prediction scenario; missing site data of missing sites missing the wind speed site data, in the training process, the missing site data is the part of data intentionally removed or masked from the complete data, and the true value thereof will be used as a learning goal; an adjacency weight matrix describing the adjacency between the missing sites and other sites, which defines the connection relationship and strength between all nodes in the graph, even for the missing nodes with missing data, the potential association thereof with other sites is also reflected through this matrix; and site label data corresponding to the missing site data, which are the true, unmasked wind speed values of those sites regarded as "missing" sites, and the network will strive to learn to predict or reconstruct these values.
[0122] Among them, it can also be that a full sequence of nodes is randomly missing from an original complete spatio-temporal wind speed graph sequence, and the missing sequence values are all filled with zeros as the missing site data of the missing sites, which correspond to the missing data of the missing wind speed sites in the actual continuous spatio-temporal graph sequence, so as to obtain a training spatio-temporal graph sequence corresponding to missing data of a wind speed site.
[0123] After the training data is prepared, the network begins to build its core computing mechanism. In this embodiment, a spatio-temporal graph attention network composed of 4+1=5 layers of graph attention layers is used to reconstruct the missing wind speed data. The input of the spatio-temporal graph attention network is the original graph sequence with missing values at t-S to t time, wherein the missing sequence is filled with zeros and marked. The spatio-temporal graph attention network architecture has 5 layers of graph attention layers, each layer uses different proportions of dropout rate for regularization, and the calculation formula of the graph attention parameters is as shown in the following formula (8).
[0124]
[0125] Therefore, in the training process, based on the input missing site data (which is usually its masked representation or initial embedding during training), the initial node feature vector Subsequently, based on these initial node feature vectors, the adjacency matrix (which defines the spatial dependency structure between nodes), and the attention parameters a ij, to build the node feature update function of each graph attention layer in the spatio-temporal graph attention network. This node feature update function is the core of the graph attention network, which specifies how the features of each node are aggregated and transformed based on its own and neighbor node features, and dynamically weighted by the attention mechanism, so as to learn higher-level node representations in each layer of the network. How to determine this node feature update function will be described further below.
[0126] With reference to Figure 6 , based on the node feature vector, the adjacency matrix and the attention parameters of the spatio-temporal graph attention network, the node feature update function of each graph attention layer in the spatio-temporal graph attention network is constructed, including the following steps 601 to 602.
[0127] Step 601: Accumulate the attention parameters between the missing station and each other station, and then multiply the adjacency weight matrix and the node feature vector of the previous layer of the graph attention layer to obtain the node feature update term.
[0128] Step 602: Perform activation function processing based on the node feature update term to obtain the node feature update function of the current layer of the graph attention layer.
[0129] The steps 601 to 602 are described in detail below.
[0130] In some embodiments, in order to calculate the new feature representation of the missing station in the current layer in each graph attention network, it is necessary to first determine the influence degree of its neighbor nodes on it, that is, by accumulating the attention parameters between the missing station and each other station; then, multiply the accumulated attention weighted result by the adjacency weight matrix (which defines the basic connection strength and structure between nodes) and the node feature vector of the previous layer of the graph attention layer (i.e. the feature representation learned by its neighbor nodes in the previous layer of the network), to obtain the node feature update term, and then perform activation function processing on the node feature update term, to obtain the node feature update function of each layer of the graph attention layer as shown in the following formula (9).
[0131]
[0132] wherein, wherein α ij is the attention parameter, W is the adjacency weight matrix, is the node feature vector, is the neighbor set of node i.
[0133] This multiplication operation combines dynamic attention weights, static graph structure information, and neighbor node feature information, ultimately obtaining a comprehensive "node feature update term". This update term is essentially the information aggregated from the neighborhood of the target node, filtered and weighted by the attention mechanism. This result processed by the activation function will be used as the input of the next layer of graph attention layers, or as the final output of the network (e.g., reconstructed wind speed values) in the last layer.
[0134] Through steps 601 and 602 above, dynamic weighting aggregation of neighborhood information is achieved by accumulating attention parameters and combining adjacency weight matrices and the last layer node feature vectors, obtaining the core node feature update term, so that the network can intelligently focus on the most valuable neighbors for information reconstruction of missing sites. By introducing an activation function, the necessary nonlinearity is introduced to the linearly aggregated features, thus constructing a complete node feature update function for the current layer of graph attention layers, enabling the spatiotemporal graph attention network to abstract and refine complex dependency relationships in spatiotemporal graph data layer by layer, accurately estimate and fill in missing wind speed data for missing sites, 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, a suitable loss function needs to be defined. In this embodiment, the loss function is generated based on the data difference between the node feature vector output by the network (especially the reconstructed wind speed values for missing sites) and the real site label data (i.e., the original and accurate wind speed values for these missing sites), as described below.
[0138] Referring to Figure 7 , a loss function is constructed based on the data difference between the node feature vector and the site label data, including steps 701 to 703.
[0139] Step 701: Based on the 2-norm of the edge weight matrix between nodes, multiply by a regularization coefficient to obtain the edge weight norm.
[0140] Step 702: Based on the 2-norm of all data differences, perform average processing 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 spatio-temporal graph attention network from overfitting during the training process, and to make the spatio-temporal graph attention network learn more concise and generalizable parameters, a regularization term is usually included in the loss function. The calculation of this regularization term is based on the Frobenius norm of the edge weight matrix used by the model to represent the connections between nodes. Therefore, based on the Frobenius norm of the edge weight matrix, multiplied by the regularization coefficient λ, the edge weight norm is obtained Where the edge weight matrix refers to the learnable weight parameters in the graph attention layer, which indirectly or directly affect the strength of information transmission between nodes. This edge weight norm will serve as a penalty term, encouraging the model to learn weights with smaller values, thus avoiding overly complex models.
[0144] In addition, the core component of the loss function is a measure of the model's reconstruction accuracy. Therefore, based on the Frobenius norm of the edge weight matrix, multiplied by the regularization coefficient λ, the edge weight norm is obtained
[0145]
[0146] The loss function combines the model's goodness of fit to the training data and the complexity control of the model, 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 Frobenius norm of all data differences and averaging, a data difference norm that intuitively measures the model's reconstruction performance is obtained. Then, by combining these two, the final loss function is formed, so that the spatio-temporal graph attention network not only strives to improve the reconstruction accuracy of missing wind speed data during training, but also avoids learning overly complex model parameters, thus 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: Based on the node feature update function and the loss function, the network parameters and node feature vectors of the spatio-temporal graph attention network are iteratively updated. The network parameters after multiple iterations are used for node relationship attention processing on consecutive spatio-temporal graph sequences.
[0149] Step 504 is described in detail as follows.
[0150] In some embodiments, after determining the node feature update function and the loss function of the spatio-temporal graph attention network, the network parameters (weight matrices inside each attention layer and parameters related to attention coefficient calculation) of the spatio-temporal graph attention network and the node feature vectors that may exist in certain architectures are iteratively updated. This iterative update process usually adopts gradient descent and its variants (such as Adam optimizer) to adjust the network parameters by backpropagating the gradients calculated by the loss function, which is described as follows.
[0151] Referring to Figure 8 , the iterative update of the network parameters and the node feature vectors of the spatio-temporal graph attention network based on the node feature update function and the loss function includes the following steps 801 to 802.
[0152] Step 801: using the node feature update function of the graph attention layer to perform relationship attention processing on the input data to obtain output data, the input data of the first graph attention layer being the node feature vector, the input data of the subsequent graph attention layer being the output data of the previous graph attention layer, and the output data of the last graph attention layer being the reconstructed station data of the missing station.
[0153] Step 802: updating 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 as follows.
[0155] In some embodiments, in the process of iteratively updating the spatio-temporal graph attention network, the forward propagation stage thereof is to perform relationship attention processing on the input data using the node feature update function of the graph attention layer. This processing process is performed layer by layer in the multi-layer cascaded graph attention network: for the first graph attention layer, the input data thereof is the initial node feature vector (for example, the original features of the wind speed station or the features after embedding processing); for each subsequent graph attention layer, the input data thereof is the output data of the previous graph attention layer, so that information can be propagated and refined layer by layer. Through the action of the node feature update function of each layer of the graph attention layer, the node feature is updated according to the neighborhood information and the attention weight. After the processing of all the graph attention layers, the output data of the last graph attention layer is the reconstructed station data of the missing station by the network, which is the estimation of the missing wind speed value by the network under the current parameters.
[0156] After the spatio-temporal graph attention network utilizes the output data (i.e., the reconstructed site data) obtained from each training spatio-temporal graph sequence, it compares the output data with the real site label data, and calculates the gradient of the loss function with respect to the network parameters (including the hidden layer dimension, dropout rate, learning rate, and other parameters) of the graph attention layer based on the loss function through the back propagation algorithm. Then, using the gradient information, the network parameters (including the hidden layer dimension, dropout rate, learning rate, and other parameters) are updated through an optimization algorithm (such as Adam, SGD, etc.). 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 output closer to the real value in the next iteration.
[0157] After multiple iterations of such updates, the network parameters of the spatio-temporal graph attention network gradually converge to a set of values that can better complete the reconstruction task. These well-trained network parameters can then be used to efficiently and accurately perform node relationship attention processing on new, actually observed continuous spatio-temporal graph sequences to achieve reconstruction of missing wind speed data in the real world.
[0158] The node relationship attention processing is performed in each layer of the graph attention layer of the spatio-temporal graph attention network, and the core purpose is to dynamically evaluate and utilize the degree of mutual influence between wind speed sites in the graph to more accurately update the feature representation of each node, especially the missing wind speed site. Specifically, when performing node relationship attention processing on the wind speed site data of the missing wind speed site based on the weight adjacency elements through the multi-layer cascaded graph attention layer, in each layer of the graph attention layer, for each missing wind speed site, the attention coefficient between the missing wind speed site and all other wind speed nodes is calculated (as shown in formula (8) above); then, the attention coefficient is used as a weight to combine the weight adjacency elements between the missing wind speed site and other wind speed sites, and the features of the missing wind speed site and other wind speed sites (node feature vectors from the previous layer of the graph attention layer) to perform weighted aggregation to realize feature update for the missing wind speed site in the multi-layer graph attention layer (as shown in formula (9) above), and through the multi-layer cascaded graph attention layer, the information of the missing wind speed site is propagated and refined layer by layer in the graph, so that the spatio-temporal graph attention network can capture complex long-range and short-range spatio-temporal dependencies, and finally achieve high-precision reconstruction of the wind speed site data of the missing wind speed site to form a complete spatio-temporal graph sequence.
[0159] Exemplarily, the embodiment selects the Adam optimizer for model training, sets the initial learning rate to 0.001, adopts the learning rate decay strategy, and multiplies 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. The early stopping strategy is adopted during training, and the training is terminated when the validation set loss does not improve for 20 consecutive epochs. The hyperparameter tuning is determined by the grid search method to determine the optimal combination of parameters, including the hidden layer dimension, the dropout rate, the learning rate, and the like.
[0160] In the processing of the time series graph data with missing values by using the trained 5-layer spatiotemporal graph attention network, for the sequence in the time window t-S to t, the missing part is initialized as a zero vector and input into the spatiotemporal graph attention network, the spatiotemporal graph attention network captures the spatial relationship between nodes and the time sequence characteristics of each node through the multi-layer graph attention mechanism, and finally outputs the reconstructed complete graph structure sequence, and obtains the complete spatiotemporal graph sequence based on multiple time-continuous graph structure sequences. The reconstruction process is represented as: (4, S) + zeros (1, S) - (5, S) → (4, S) + 5-layer GAT (1, S) - (5, S), where S represents the number of stations, 4 represents the number of historical time steps retained by each station, 1 represents the number of time steps to be reconstructed, and 5 represents the total number of output time steps (history plus prediction).
[0161] Reference Figure 9 is a structural framework schematic diagram of a spatiotemporal graph attention reconstruction model provided by the embodiment of the present application. As shown in Figure 9 , the original wind speed sequence containing missing station data and the corresponding original graph structure time sequence are shown as inputs. The data then enters a network composed of multiple graph attention layers and fully connected layers in cascade, and the processing of the missing sequence and the different dropout rates adopted to prevent overfitting are also identified in the graph. The skip connection operation existing in the network helps information flow and feature learning. Through the processing of these layers, especially the attention processing of the graph attention layer to the node relationship, the network finally outputs the reconstructed graph structure time sequence, that is, the complete spatiotemporal graph sequence obtained after the wind speed station data of the missing wind speed station is completed.
[0162] In order to further reflect the reliability of the data reconstruction provided by the present application, the embodiment evaluates the quality of the reconstructed data through multiple indicators, which include the mean absolute error (MAE), the mean square error (MSE), the mean absolute percentage error (MAPE), and the reconstruction accuracy, and the specific formulas are shown in formulas (11) to (13).
[0163]
[0164]
[0165] where and are the predicted wind speed values and ground truth values of site i at time j respectively; Q is the length of the predicted time series, and N is the number of sites.
[0166] With the trained spatiotemporal graph attention network, other complete node sequences are taken as model inputs to obtain the corresponding missing site wind speed sequence outputs, which are compared with the real data, and are simulated and compared 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 follows.
[0167] Referring to Figure 10 is a performance simulation diagram of a first spatiotemporal graph attention reconstruction model provided by an embodiment of the present application. As shown in Figure 10 , the performance of reconstructing missing wind speed data using the "neighbor mean filling" method is shown. The black curve in the figure represents the "true value" of the wind speed changing over time, and the red curve represents the "neighbor mean filling" result of filling the missing data using the average wind speed of the neighbor sites. As can be seen from Figure 10 , although the "neighbor mean filling" can roughly follow the trend of the true value in some flat change areas, there is a significant deviation between its reconstruction result and the true value in areas where the wind speed fluctuates greatly or peak and valley values appear, and it is difficult to accurately capture the dynamic characteristics of the wind speed, which reflects the limitations of traditional spatial interpolation methods in dealing with complex wind speed data missing.
[0168] Referring to Figure 11 , is a performance simulation diagram of a second spatiotemporal graph attention reconstruction model provided by an embodiment of the present application. As shown in Figure 11 , the effect of reconstructing wind speed data using the "feature propagation filling" method is shown. The black curve in the figure is the "true value" of the wind speed, and the red curve is the result of filling the missing data by feature propagation. Compared with "neighbor mean filling", "feature propagation filling" may consider the correlation between nodes to some extent, but the reconstructed wind speed curve still has a significant gap with the true value at multiple time points, especially in areas where the wind speed changes rapidly and extreme values appear, indicating that its ability to capture complex spatiotemporal dependence and accurately reconstruct missing data is limited.
[0169] Referring to Figure 12 , is a performance simulation diagram of a third spatiotemporal graph attention reconstruction model provided by an embodiment of the present application. As shown in Figure 12 , the performance of reconstructing missing wind speed data using the "random filling" method is shown. The black curve in the figure represents the "true value" of the wind speed, and the red curve represents the "random filling" result of filling the missing data using random values. As shown in Figure 12As shown in FIG. 6, the result of the "random padding" has little correlation with the true wind speed, and the reconstructed wind speed curve presents a high degree of disorder and inaccuracy.
[0170] Referring to Figure 13 FIG. 7 is a performance simulation schematic diagram of a fourth spatio-temporal graph attention reconstruction model provided in an embodiment of the present application. As shown in FIG. 7, the performance of reconstructing missing wind speed data by using a "5-layer graph convolutional" network is shown. The black curve is the "true value" of the wind speed, and the red curve is the reconstructed wind speed obtained by processing through the 5-layer graph convolutional network. The graph convolutional network can learn features using graph structure information, so its reconstruction result is obviously improved compared with the foregoing simple padding method, and can better follow the fluctuation trend of the true wind speed. Figure 13 Referring to
[0171] FIG. 8 is a performance simulation schematic diagram of a fifth spatio-temporal graph attention reconstruction model provided in an embodiment of the present application. As shown in FIG. 8, the performance of reconstructing missing wind speed data by using a "mean padding" method (which may refer to using the mean of the entire sequence or the mean of a specific time window) is shown. The black curve is the "true value" of the wind speed, and the red curve is the result of "mean padding". The reconstructed wind speed curve obtained by this method is generally smooth and cannot reflect the dynamic changes and detailed features of the true wind speed, especially in periods of intense wind speed fluctuations, which is greatly different from the true value. Figure 14 Figure 14 Referring to FIG. 9 is a performance simulation schematic diagram of a sixth spatio-temporal graph attention reconstruction model provided in an embodiment of the present application. As shown in FIG. 9, the performance of reconstructing missing wind speed data by using the spatio-temporal graph attention reconstruction network provided in the present application is shown. 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 accurately capture various fluctuations, peaks and valleys of the true wind speed, which is significantly better than other comparative methods. This proves that the spatio-temporal graph attention network provided in the present application can effectively learn and utilize the complex dynamic spatio-temporal dependence relationship between each measuring point in the wind speed field through node relationship attention processing, thereby realizing high-precision reconstruction of missing wind speed site data, and providing a high-quality complete spatio-temporal graph sequence for subsequent wind speed data prediction results.
[0172] Figure 15 Referring to Figure 15 FIG. 10 is a performance simulation schematic diagram of a seventh spatio-temporal graph attention reconstruction model provided in an embodiment of the present application. As shown in FIG. 10, the performance of reconstructing missing wind speed data by using the spatio-temporal graph attention reconstruction network provided in the present application is shown. 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 accurately capture various fluctuations, peaks and valleys of the true wind speed, which is significantly better than other comparative methods. This proves that the spatio-temporal graph attention network provided in the present application can effectively learn and utilize the complex dynamic spatio-temporal dependence relationship between each measuring point in the wind speed field through node relationship attention processing, thereby realizing high-precision reconstruction of missing wind speed site data, and providing a high-quality complete spatio-temporal graph sequence for subsequent wind speed data prediction results.
[0173] Referring to Figure 16 FIG. 10 is a performance simulation schematic diagram of a seventh spatio-temporal graph attention reconstruction model provided in an embodiment of the present application. As shown in FIG. 10, the performance of reconstructing missing wind speed data by using the spatio-temporal graph attention reconstruction network provided in the present application is shown. 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 accurately capture various fluctuations, peaks and valleys of the true wind speed, which is significantly better than other comparative methods. This proves that the spatio-temporal graph attention network provided in the present application can effectively learn and utilize the complex dynamic spatio-temporal dependence relationship between each measuring point in the wind speed field through node relationship attention processing, thereby realizing high-precision reconstruction of missing wind speed site data, and providing a high-quality complete spatio-temporal graph sequence for subsequent wind speed data prediction results. Figure 16 As shown in the figure, 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 curves may represent the uncertainty or error range. As can be seen from the figure, even in a long time series, the red curve can still closely follow the complex changes of the black curve, including long-term trends and short-term dramatic fluctuations, and the uncertainty ranges of the two are also in good agreement. The robustness and high precision of the spatiotemporal graph attention reconstruction network provided in this application in processing actual and continuous wind speed data are demonstrated, and it 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 continuous spatiotemporal graph sequences containing missing wind speed stations, generating complete spatiotemporal graph sequences containing accurately reconstructed data, providing a more reliable and complete data basis 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 the complete spatiotemporal graph sequence corresponding to the data reconstruction in the prediction scenario, since the complete spatiotemporal graph sequence already contains the wind speed information of all wind speed stations in the prediction scenario (including the originally missing wind speed stations) and retains rich spatiotemporal structure features, it is sent to a pre-constructed 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 result of the prediction scenario, i.e., accurate estimation 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 the wind speed data of the prediction scenario.
[0179] In this embodiment, a hybrid model combining graph neural networks (GNN) and time series Transformers is used to construct a wind speed prediction model for wind speed sequence prediction, and data residuals are 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 process the embedding conversion of frequency components, trend components, and edge features, respectively. The frequency component embedding layer maps the decomposed frequency part to the model hidden dimension space; the trend component embedding layer maps the main trend part of the time series to the model hidden dimension space; and the edge feature embedding layer maps the edge feature describing the relationship between nodes to the model hidden dimension space.
[0181] In the wind speed prediction model, multiple graph layers are included, 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 inside, responsible for updating the edge features. The node update function uses a Transformer encoder layer combined with a fast Fourier transform attention mechanism with a logarithmic sparse attention pattern, improving the efficiency of long sequence processing.
[0182] In the wind speed prediction model, a wavelet transform decomposition module and a prediction placeholder are also defined.
[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 loss function uses mean squared error (MSE).
[0184] In the training process of the wind speed prediction model, the reconstructed complete spatio-temporal graph sequence structure is divided into training data sets according to the designed prediction window. Three prediction windows are designed: predicting 1 step using 30 marker steps, predicting 10 steps using 30 marker steps, and predicting 30 steps using 60 marker steps. The data set is divided into three parts: 60% for training, 20% for validation, and the remaining part for testing. Then, wavelet transform is applied to the input sequence for decomposition, and the original time series is decomposed into trend components and frequency components, with placeholders added at the end of the decomposed sequence. After that, the prepared trend components, frequency components, and edge features are processed through their respective embedding layers, and then the embedded node features and edge features are reorganized into a graph structure, ready to be input into the graph neural network. The processed graph structure data is then input into the graph neural network for forward propagation to generate a complete prediction sequence and attention weights. According to the prediction length, the corresponding prediction results are extracted, with the output dimension being [batch size, prediction length, feature dimension], representing the wind speed prediction value at future time steps.
[0185] Each training process includes calculating prediction values and loss through forward propagation, calculating gradients through backpropagation, updating model parameters through the optimizer, evaluating model performance on the validation set, adjusting the learning rate based on the validation set performance, and checking early stopping conditions. After training is complete, the model can receive any graph structure wind speed data as input to predict future time step wind speed values.
[0186] Based on the wind speed prediction model constructed above, how to use the wind speed prediction model to predict wind speed data will be further described below.
[0187] Referring to Figure 17 The complete spatiotemporal graph sequence is input into the wind speed prediction model for data processing to obtain the wind speed data prediction result of the prediction scene, including the following steps 1701 to 1703.
[0188] Step 1701: In the wind speed prediction model, after wavelet transform decomposition processing of the complete spatiotemporal graph sequence, a placeholder is added at the end to obtain the trend component and the frequency component.
[0189] Step 1702: The trend component and the frequency component are embedded to obtain embedded node features, and based on the embedded node features and embedded edge features, graph structure data is obtained.
[0190] Step 1703: The graph structure data is input into the graph neural network for forward propagation processing to obtain the wind speed data prediction result.
[0191] The steps 1701 to 1703 will be 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 preprocesses the time series data therein, that is, wavelet transform decomposition processing is performed 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 time series into different time-frequency domains, thereby effectively separating different components of the signal. After this decomposition processing, in order to facilitate subsequent unified processing or sequence alignment of the model, a placeholder is then added at 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 long-term changes and low-frequency characteristics of the signal) and frequency components (representing 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 the frequency component, embedding processing is performed on the trend component and the frequency component respectively (i.e., mapping the numerical or categorical (if applicable) components into a high-dimensional, dense vector space), so as 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 also combines the connection relationship of the graph and the attribute of the edge, i.e., embedded edge features (these edge features may come from the edge features in the original graph construction stage and also undergo embedding processing to match the dimension and representation of the node features), combines the embedded node features with the topology of the graph, and thus obtains graph structure data. This graph structure data contains both the dynamic characteristics of the nodes and the spatial correlation information between the nodes.
[0194] After obtaining the graph structure data, the graph structure data is input into a graph neural network (GNN), information is propagated and aggregated between the nodes of the graph through a message passing mechanism, and forward propagation processing is performed, i.e., the data flows through each layer of the GNN, and each layer updates the representation of the node according to the information of the neighbor nodes and the characteristics of the node itself. Through this multi-layer information aggregation and conversion, the GNN can learn complex spatiotemporal dependencies and patterns, and finally output the prediction of the future wind speed, i.e., obtain the wind speed data prediction result.
[0195] Through the above steps 1701 to 1703, the wavelet transform decomposition enables the model to focus on the trend and fluctuation details in the wind speed data, and the placeholder processing is used as an aid, and then the embedding processing is used to convert these decomposed components and edge information into high-dimensional features, and the graph structure data containing rich spatiotemporal information is constructed, and the powerful graph learning ability of the graph neural network is used to perform deep processing on the graph structure data, so as to capture complex spatiotemporal dynamics and generate accurate wind speed data prediction results, so that the model can more comprehensively understand the evolution law of the wind speed, and finally realize high-precision prediction of the wind speed data in the prediction scenario.
[0196] Reference Figure 18 is a structural framework schematic diagram of a wind speed prediction model based on a spatiotemporal graph sequence provided by an embodiment of the present application. As shown in Figure 18 The "processed graph sequence" (i.e., the complete spatiotemporal graph sequence) is taken as the input of the model. The model internally contains two core modules: the collaborative work of the spatial feature extraction module and the temporal feature extraction module, and the model can simultaneously capture complex spatial dependencies and temporal dynamics, and finally output a predicted graph sequence, i.e., the wind speed data prediction result in the prediction scenario.
[0197] In order to further reflect the reliability and accuracy of the data prediction provided in the present application, the measured data on the validation measurement point is compared and verified with the model prediction value, the prediction accuracy of the model in different prediction windows and compared with the baseline model is evaluated. The original wind speed data of the test set is used as the model input, the corresponding output of the prediction window step is obtained, the simulation comparison is carried out between different sequence prediction models and the true value, and the predictability of the reconstructed data is as follows.
[0198] Referring to Figure 19 is a performance simulation schematic diagram of a first wind speed prediction model based on a spatiotemporal graph sequence provided in an embodiment of the present application. As shown in Figure 19 , the performance of the wind speed prediction model in predicting the wind speed for 1 marker step in the future when using the complete spatiotemporal graph sequence of 30 marker steps as input is shown. 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 used in the present scheme, i.e., the wind speed prediction model). It can be seen that in short-term single-step prediction, various advanced models, especially the wind speed prediction model corresponding to the Transformer architecture proposed in the present scheme, can better track the trend of the true wind speed, which shows that the strategy of inputting the complete spatiotemporal graph sequence into the wind speed prediction model for processing to obtain the wind speed data prediction result in the present application can achieve good prediction effect in short-term prediction.
[0199] Referring to Figure 20 is a performance simulation schematic diagram of a second wind speed prediction model based on a spatiotemporal graph sequence provided in an embodiment of the present application. As shown in Figure 20 , the prediction horizon is extended to 10 marker steps in the future. When the prediction step increases, the prediction performance of different models differs more obviously. As shown in the figure, although the prediction accuracy of all models has decreased compared with single-step prediction, the advanced models based on Transformer (such as Transformer, Informer, Autoformer, and fast Fourier-Transformer network) can still more accurately capture the main fluctuation characteristics and trends of the wind speed compared with LSTM and MLP, especially in the prediction of peak and valley. This shows that the wind speed prediction model proposed in the present application can effectively utilize the spatiotemporal information in the complete spatiotemporal graph sequence when processing the medium-length multi-step prediction task, and provide relatively reliable wind speed data prediction results.
[0200] Referring to Figure 21This is a performance simulation diagram of the third wind speed prediction model based on spatiotemporal graph sequences provided in this application embodiment. Figure 21 The figure shows the performance of the wind speed prediction model under conditions of longer input sequences (60 labeled steps) and longer prediction horizons (30 labeled steps). With a significant increase in prediction duration, the prediction difficulty increases substantially, 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) exhibit relatively stronger robustness in long-term predictions, and their prediction curves still maintain a certain degree of consistency with the actual values in terms of overall trend and some key fluctuations. This demonstrates that when dealing with challenging long-term wind speed prediction tasks, the wind speed prediction model proposed in this application can still strive to extract effective information to generate highly accurate wind speed data prediction results through deep spatiotemporal feature learning of complete spatiotemporal map sequences.
[0201] Reference Figure 22 This is a performance simulation diagram of the fourth wind speed prediction model based on spatiotemporal graph sequences provided in this application embodiment. Figure 22 The figure illustrates the correlation between data reconstruction and subsequent prediction in the scheme provided in this application, as well as the effects of different prediction strategies. The blue curve (reconstructed data) and the black curve (true value) of the "marked sequence" in the figure highly match in the historical data section, demonstrating the efficiency and accuracy of the spatiotemporal graph attention network in data reconstruction. Based on this high-quality reconstructed data (i.e., the complete spatiotemporal graph sequence), the prediction sequence output compares the wind speed prediction results obtained from various prediction strategies (such as predicting 30 steps at once, predicting 10 steps each time in 3 separate predictions, and predicting 1 step each time in 30 separate predictions). It can be seen that different prediction strategies affect the final prediction accuracy, but this is contingent on high-quality reconstructed data from the initial stage. This demonstrates the overall effectiveness of the technical approach of accurately reconstructing data before prediction in this application, proving that a high-quality complete spatiotemporal graph sequence is the key foundation for achieving accurate wind speed data prediction results.
[0202] Reference Figure 23 This is a schematic diagram of a wind speed data prediction process for a prediction scenario provided in an embodiment of this application. Figure 23Fig. 1 is a schematic diagram of a comprehensive application scenario, which intuitively shows the complete implementation process and expected effect of the wind speed data prediction method provided by the present application in a specific prediction scenario (such as a mountainous environment along a railway line, including sites A, B, C, D, E and their three-dimensional coordinates). The left side shows the distribution of the original wind speed signals of multiple wind speed sites in a specific geographical environment, and the time dimension graph structure time sequence formed thereby, in which there are data missing (as shown by the light-colored nodes). In the middle, the original signal sequence containing missing data is converted into a reconstructed data time sequence (i.e., a complete spatiotemporal graph sequence) with complete data through a wind speed reconstruction process. Subsequently, the reconstructed data is input for sequence prediction, and finally the wind speed data prediction results for a future period of time (t+1, t+2, …, t+P) are obtained.
[0203] The wind speed data prediction method, device, electronic equipment and storage medium provided by the embodiments of the present application comprise the following steps: first, the three-dimensional space coordinates of multiple wind speed sites in a prediction scene are obtained, and the three-dimensional space coordinates and the direction weight of each two wind speed sites are used for weighted sum and calculation to obtain the edge feature between each two wind speed sites. The difference between the three-dimensional space coordinates of each two wind speed sites is obtained and is processed by percentage to obtain a graph connection threshold value. When the difference between the three-dimensional space coordinates of each two wind speed sites does not exceed the graph connection threshold value, the reciprocal of the edge feature is used to obtain the weight adjacency element of each two wind speed sites, and all the weight adjacency elements are combined to obtain an adjacency matrix. The sum of each column element in the adjacency matrix is used to obtain a degree matrix. The degree matrix is normalized to obtain a graph structure. The graph structures corresponding to multiple continuous times are combined to obtain a continuous spatio-temporal graph sequence. The continuous spatio-temporal graph sequence comprises the adjacency matrix, and the continuous spatio-temporal graph sequence does not comprise the wind speed site data of a missing wind speed site. The adjacency matrix comprises the weight adjacency element between the missing wind speed site and other wind speed sites. Then, the continuous spatio-temporal graph sequence is input into a spatio-temporal graph attention network. The wind speed site data of the missing wind speed site is subjected to node relationship attention processing based on the weight adjacency element through multiple levels of cascaded graph attention layers in sequence to obtain a complete spatio-temporal graph sequence. The complete spatio-temporal graph sequence comprises the wind speed site data of the missing wind speed site. The training process of the spatio-temporal graph attention network comprises the following steps: multiple training spatio-temporal graph sequences are obtained. The training spatio-temporal graph sequence comprises multiple site data, missing site data, adjacency weight matrix between the missing site and other sites, and 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. The node feature vector is multiplied by the adjacency weight matrix and the node feature vector of the last layer of the graph attention layer to obtain a node feature update term. The node feature update term is subjected to an activation function processing to obtain a node feature update function of the current layer of the graph attention layer. The two-norm of the edge weight matrix between the nodes is multiplied by a regularization coefficient to obtain an edge weight norm. The two-norm of all data differences is averaged to obtain a data difference norm. The edge weight norm and the data difference norm are accumulated to obtain a loss function. The network parameters and the node feature vector of the spatio-temporal graph attention network are iteratively updated based on the node feature update function and the loss function. The network parameters after multiple iterations are used for node relationship attention processing on the continuous spatio-temporal graph sequence. Finally, in the wind speed prediction model, the complete spatio-temporal graph sequence is subjected to wavelet transform decomposition processing, and a placeholder is added at the end to obtain a trend component and a frequency component. The trend component and the frequency component are embedded to obtain embedded node features. The embedded node features and embedded edge features are used to obtain graph structure data. The graph structure data is input into a graph neural network for forward propagation processing to obtain a wind speed data prediction result.
[0204] The embodiments of the application can explicitly determine the spatial topological relationship and potential influence strength between wind speed sites from the initial stage by constructing a continuous spatiotemporal graph sequence containing weight adjacency elements, thereby 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, the known site data and its spatiotemporal correlation can be intelligently and dynamically learned and utilized to reconstruct the wind speed data of the missing site with high precision, which is much better than the way of relying only on fixed spatial distance or statistical characteristics of the traditional spatial interpolation method. Thus, a more realistic and complete spatiotemporal graph sequence is obtained. Then, the 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 dependence information. This can overcome the deficiencies of the prior art in processing missing data and capturing complex dynamic spatiotemporal dependence relationships, thereby significantly improving the accuracy of wind speed data prediction in complex prediction scenarios (such as railway environments). In addition, the weight adjacency elements in the adjacency matrix are accurately defined by using threshold judgment and edge feature reciprocal calculation, reflecting the connection strength between sites. Then, the degree matrix is calculated and normalized, obtaining a normalized graph structure, which facilitates subsequent model processing. The graph structures at 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 complex spatial dependence relationships and their temporal evolution, thereby laying a solid data foundation for subsequent missing data reconstruction and high-precision wind speed prediction. Furthermore, the edge features calculated by introducing direction weights more finely depict the spatial relationship between sites, and the graph connection threshold is adaptively determined by processing the percentage of three-dimensional coordinate difference values, making the graph construction more robust. By comprehensively utilizing these information, a continuous spatiotemporal graph sequence reflecting the dynamic characteristics of the real wind speed field is generated, which can more accurately capture the complex interactions between each measuring point in the wind speed field, thereby providing a solid foundation for subsequent high-precision data reconstruction and prediction, and improving the effectiveness and reliability of the overall prediction scheme.And, by accumulating attention parameters and combining adjacency weight matrix and last layer node feature vector, dynamic weighted aggregation of neighborhood information is realized, core node feature update item is obtained, the network can intelligently focus on the most valuable neighbors for information reconstruction of the missing site, and through the introduction of the activation function processing, the necessary nonlinearity is introduced for the linearly aggregated features, so as to construct the node feature update function of the current layer graph attention layer, so that the spatiotemporal graph attention network can abstract and refine the complex dependency relationship in the spatiotemporal graph data layer by layer, accurately estimate and fill the missing wind speed data of the site, and finally 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. In addition, by calculating the two norms of all data differences and performing average processing, a data difference norm is obtained to measure the performance of the model. In addition, the two are combined to form the final loss function, so that the spatiotemporal graph attention network not only strives to improve the reconstruction accuracy of the missing wind speed data during training, but also avoids learning too complex model parameters, so as to ensure that the model also has good performance on unseen data, which can effectively improve the reliability of wind speed data reconstruction in actual application. In addition, by using wavelet transform decomposition, the model can focus on the trend and fluctuation details of the wind speed data respectively, and is supplemented by placeholder processing. Then, through embedding processing, these decomposed components and edge information are converted into high-dimensional features, and a graph structure data containing rich spatiotemporal information is constructed. Then, by using the powerful graph learning ability of the graph neural network, the graph structure data is deeply processed, so as to capture complex spatiotemporal dynamics and generate accurate wind speed data prediction results, so that the model can more comprehensively understand the wind speed evolution law, and finally realize high-precision prediction of the wind speed data of the prediction scene.
[0205] The embodiment of the present application also provides an electronic device, which comprises:
[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 realize the wind speed data prediction method of the embodiment of the present application. The electronic device can be any intelligent terminal, including mobile phone, tablet computer, personal digital assistant (PDA), vehicle-mounted computer, etc.
[0210] Please refer to Figure 24 , Figure 24 The hardware structure of the electronic device of another embodiment is illustrated, and the electronic device comprises:
[0211] The processor 2401 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, and is configured to execute related programs to implement the technical solutions provided by the embodiments of the present application.
[0212] The memory 2402 can be implemented by a ROM (Read Only Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory), etc. The memory 2402 can store an operating system and other application programs. When the technical solutions provided by the embodiments of the present application are implemented by software or firmware, the related program codes are stored in the memory 2402 and are called and executed by the processor 2401 to implement the wind speed data prediction method of the embodiments of the present application.
[0213] The input / output interface 2403 is configured to realize information input and output.
[0214] The communication interface 2404 is configured to realize the communication interaction between the device and other devices. The communication can be realized by a wired manner (for example, a USB, a network cable, etc.) or a wireless manner (for example, a mobile network, WIFI, Bluetooth, etc.).
[0215] The bus 2405 is configured to transmit information between various components (for example, the processor 2401, the memory 2402, the input / output interface 2403, and the communication interface 2404) of the device.
[0216] The processor 2401, the memory 2402, the input / output interface 2403, and the communication interface 2404 are connected to each other through the bus 2405 to realize the communication connection between the device.
[0217] The embodiments of the present application further provide a storage medium, which is a computer readable storage medium, and stores a computer program. The computer program is executed by a processor to implement the wind speed data prediction method.
[0218] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory can include a high-speed random access memory and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory disposed remotely from the processor, which can be connected to the processor through a network. Examples of the above 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 the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0220] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps than shown in the figures, or combine certain steps, or different steps.
[0221] The device embodiments described above are only schematic, and the units described as separate components can or can not be physically separate, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0222] Those skilled in the art can understand that all or some of the steps in the above disclosed method, the functional modules / units in the system and the device can be implemented as software, firmware, hardware and their appropriate combinations.
[0223] The terms "first", "second", "third", "fourth" and the like used in the specification of the present application and the above-described drawings, if any, are used to distinguish similar objects, and do not necessarily have to describe a particular order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0224] It should be understood that, in the application, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" is used to describe the association relationship of the associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases of only A, only B and A and B existing at the same time, wherein A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after it. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can represent a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b and c can be single or multiple.
[0225] In several embodiments provided in the 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 only illustrative, for example, the division of the above units is only a logical function division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The coupling or direct coupling or communication connection between the displayed or discussed each other can be through some interface, indirect coupling or communication connection between devices or units, which can be electrical, mechanical or other forms.
[0226] The units described above as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.
[0227] In addition, each functional unit in each embodiment of the application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit.
[0228] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in other words, the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.
[0229] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, and are not limited to the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.
Claims
1. A wind speed data prediction method characterized by, The method comprises: obtaining three-dimensional spatial coordinates of multiple wind speed sites in a predicted scene, and constructing a continuous space-time graph sequence in the predicted scene based on the multiple three-dimensional spatial coordinates, the continuous space-time graph sequence comprising an adjacency matrix, the continuous space-time graph sequence not comprising wind speed site data of a missing wind speed site, the adjacency matrix comprising weight adjacency elements between the missing wind speed site and other wind speed sites; inputting the continuous space-time graph sequence into a space-time graph attention network, sequentially passing through multiple cascaded graph attention layers to perform node relationship attention processing on the wind speed site data of the missing wind speed site based on the weight adjacency elements, and obtaining a complete space-time graph sequence, the complete space-time graph sequence comprising the wind speed site data of the missing wind speed site; inputting the complete space-time graph sequence into a wind speed prediction model for data processing to obtain a wind speed data prediction result of the predicted scene; the method of constructing the continuous space-time graph sequence in the predicted scene based on the multiple three-dimensional spatial coordinates comprises: performing weighted sum calculation based on the three-dimensional spatial coordinates and directional weights of each two wind speed sites to obtain edge features between each two wind speed sites; performing percentage processing based on the difference between the three-dimensional spatial coordinates of each two wind speed sites to obtain a graph connection threshold; obtaining the continuous space-time graph sequence based on the graph connection threshold and the edge features; the training process of the space-time graph attention network comprises: obtaining multiple training space-time graph sequences, the training space-time graph sequences comprising 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; generating a node feature vector based on the missing site data, and constructing a node feature update function of each graph attention layer in the space-time graph attention network based on the node feature vector, the adjacency matrix, and attention parameters of the space-time graph attention network; constructing a loss function based on the data difference between the node feature vector and the site label data; iteratively updating network parameters of the space-time graph attention network and the node feature vector based on the node feature update function and the loss function, and the network parameters after multiple iterative updates being used for node relationship attention processing on the continuous space-time graph sequence.
2. The wind speed data prediction method of claim 1, wherein, the method of obtaining the continuous space-time graph sequence based on the graph connection threshold and the edge features comprises: when the difference between the three-dimensional spatial coordinates of each two wind speed sites does not exceed the graph connection threshold, obtaining the weight adjacency elements of each two wind speed sites based on the reciprocal of the edge features, and combining all the weight adjacency elements to obtain an adjacency matrix; obtaining a degree matrix based on the sum of elements in each column of the adjacency matrix; performing normalization processing based on the degree matrix to obtain a graph structure; combining graph structures corresponding to multiple continuous times to obtain the continuous space-time graph sequence.
3. The wind speed data prediction method of claim 1, wherein, The node feature vector is generated based on the missing station data, and a node feature update function of each graph attention layer in the spatio-temporal graph attention network is constructed based on the node feature vector, the adjacency matrix, and attention parameters of the spatio-temporal graph attention network, including: The attention parameters between the missing station and each other station are accumulated, and then multiplied by the adjacency weight matrix and the node feature vector of the previous layer graph attention layer to obtain a node feature update term; The node feature update term is processed by an activation function to obtain the node feature update function of the current layer graph attention layer.
4. The wind speed data prediction method of claim 1, wherein, The loss function is constructed based on the data difference between the node feature vector and the station label data, including: The edge weight norm is obtained based on the two-norm of the edge weight matrix between nodes and multiplied by a regularization coefficient; The data difference norm is obtained by averaging the two-norm of all data differences; The loss function is obtained by accumulating the edge weight norm and the data difference norm.
5. The wind speed data prediction method of claim 1, wherein, The network parameters of the spatio-temporal graph attention network and the node feature vector are iteratively updated based on the node feature update function and the loss function, including: The input data is processed by relationship attention using the node feature update function of the graph attention layer to obtain output data, the input data of the first graph attention layer is the node feature vector, the input data of the subsequent 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 station data of the missing station; The network parameters of the graph attention layer are updated based on the output data and the loss function.
6. The wind speed data prediction method of claim 1, wherein, The complete spatio-temporal graph sequence is input into the wind speed prediction model for data processing to obtain the wind speed data prediction result of the prediction scenario, including: In the wind speed prediction model, the complete spatio-temporal graph sequence is decomposed by wavelet transform, and a placeholder is added at the end to obtain a trend component and a frequency component; The trend component and the frequency component are embedded to obtain embedded node features, and graph structure data is obtained based on the embedded node features and embedded edge features; The graph structure data is input into a graph neural network for forward propagation processing to obtain the wind speed data prediction result.
7. An electronic device, comprising: The computer program is executed by the processor to implement the wind speed data prediction method of any one of claims 1-6.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the wind speed data prediction method of any one of claims 1-6.
Citation Information
Patent Citations
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